default values

0 views
Skip to first unread message

jbanker

unread,
Jul 18, 2009, 4:02:47 AM7/18/09
to Hoy Moon Formulaic
can I assign default values to variables? so that if the user does not
input anything it applies a default value. Simple Example:

purchase_price - capital = loan_amount


now if capital remains empty I'd like to assign the default:

capital = purchase_price * 20 / 100


how do I do that?

thanks,

hoymoon

unread,
Jul 21, 2009, 2:44:24 PM7/21/09
to Hoy Moon Formulaic
Hello J,

Thank you for your interest in Formulaic.

Currently, Formulaic works a bit like a calculator with a persistent
memory. The last values you either entered or computed are the values
of the variables when you next call up an equation. The default
starting value for a new variable is zero, and the default value for a
variable you've set or computed before is that last value.

Formulaic distinguishes between "local" and "global" variables. Local
variables exist only in the context of a particular equation. For
example, you could have several equations using a variable named
"loan_amount", and each equation would have its own variable with its
own value. Local variables start with a lower-case letter. Global
variables are shared between all equations. If you used a variable
named "Loan_Amount" in several equations, they would all share the
value - you could compute it in one equation, switch to another, and
use the just computed value. Global variables start with an upper-case
letter.

We have however considered your idea of "default values" in depth, and
believe we might have a way to add such a function to a future
version. We were thinking that a combination of a "Save Default
Values" and a "Load Default Values" button could be useful to quickly
reset several variable values to a known-state, e.g. when starting to
work on a new problem.

Kind regards,
Hoy Moon
Reply all
Reply to author
Forward
0 new messages