[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
$M
) The Arithmetic command allows simple arithmetic between Cogsys variables.
This command is used to perform simple integer arithmetic on two numbers (either variables or constants) and then store the result in a Cogsys variable. The operators allowed in the $M command are:
+
-
*
/
\
Note that Cogsys variables are stored as long integers; an operation with a result that exceeds 2,147,483,647 will yield an invalid negative number as a result, and similarly for underflow.
$M
$Mvdest=val1opval2
$MV12=12*4
V12
$MV12=V12+1
V12
by one