Remember balancing a checkbook before owning a calculator?
|
|
The reason we learned to jot down calculations that way, was because it is the most natural way for our brain to process information: bit by bit, writing down temporary results for verification...
|
|
Expressions or more formally "Dynamic Variables" (variables whose values are calculated based on the current state and not necessarily stored) are your tools to:
![]() ![]() ![]() ![]() ![]() ![]() XPad provides an easy to use intuitive metaphor to specify these!
|
|
On the right you see an expression-editor of XPad showing a simple "Increase" expression. It just adds 1 to the variable "Player" and stores the result in the same variable. The C-equivalent would be "Player = Player + 1;". However, in a flow you can "parameterize" the expression and substitute any of the variables in here, making it a generic function!
|
![]() |
Below an example of an expression which defines a common function, that stores a value (Par1) in an indexed variable (Par3) AND then increases the index (Par2) by 1.
![]() Agreed, it takes more (visual) space than the nested brackets, but it is a lot less painful for the brain and the generated code is just as efficient! Also (!) you can reuse any expression (or formula) by simply substituting different variables from the function-editors!
|