This is an old revision of the document!


Calculate

The Calculate element can arithmetically manipulate Variables, whereby the I/O remains unmodified.

This Flow Control element can apply standard arithmetic (+,-,*,/) onto a Variable. Furthermore, the modulo (%) and exponentiation (^) methods are implemented in Lua 5.1. Recall that a calculation of a Variable of type decimal and a Variable of type integer returns a decimal Variable.

To edit the formula fill in the Formula field in the Properties. Please note that Variables are called with cow.VariableName.

cow.VariableName = cow.VariableName + (any standard arithmetic symbol ) constant/cow.VariableName

The Variable is set up as an integer call factor with default value 2.
The Calculate element displays the computation. Here are some examples given.
Input Description
FirstInput Input is passed along and triggers Calculate
Output Description
FirstOutput Output which is unmodified