Variables, expressions and
calculation rules
The calculation rules of ArtSGraph are simple, but a bit
unusual. The concept is as follows.
- You can define as many variables as you need
by assigning them values
- A variable can keep as its value a number, or an
expression, containing or not containing other variables. In fact,
ArtSGraph treats a number as a simplest particular case of an expression.
- Depending on what form of assignment command you execute,
ArtSGraph does or does not evaluate expression in the right-hand side of
the command.
- Evaluation is carried out the following way. If right-hand
side expression contains variables, evaluator checks if these variables
are defined or not (i.e. if some values has been assigned to variables or
not). Each defined variable is replaced by its value, preliminarily
evaluated using the same procedure. Each non-defined variable
remains as is. Hence evaluation can result in a number or an expression.
Example.
IF
variable A has value 2 ,
variable fi has value 0 ,
variable t do not have a value,
THEN
evaluation of expression A*sin(t+fi)
gives 2*sin(t)