Action: Add(variable, A, B)

Related Actions: let, sub, mul, div, mod, random
Related Events:overflow
See also: FKiSS, Events, Actions

add(variable, A, B)

First defined in: FKiSS3
The add action sets the value of variable to the value of (A + B).
If the result would be outside the range of a 32-bit integer (from -2147483648 to 2147483647), this action will trigger the Overflow event.

variable

variable must a variable name.

A

A may be number or a variable.

B

B may be number or a variable.

Example:

;@ add(X, X, 1)   ; Add the value of 1 to X and store the result back in X.
;@ add(Sum, A, B) ; Add A and B and store the result in Sum.