Contents | Index | < Browse | Browse >
CALCVAR ResultVar Argument operator Argument
******* THIS COMMAND IS OBSOLETE *********
You can use instead the $(expression) method to do complex
math calculations using flaoting point numbers etc.
However, the command still works for compatibility, but it does
not handle floating point numbers - it converts them to whole
numbers - which may sometimes prove useful..
******************************************
This command is a feeble attempt at giving Gui4Cli some mathematical
abilities. Gui4Cli is not meant to be a programming language in
the usual sense, so maths is usually not needed, still...
CalcVar Result 2 + 3
- will place the number 5 into variable Result.
You can also (like in the SetVar command) use :
Result == 2 + 3
- which is easier to the eye.
All calculations are *Integer* only!
Operators are : + - * / also % (modulus) and ^ (to the power of)