Operator ++ Foundation
Increment operators (unary): increase numeric or date value by one.
++<VarName> // Prefix incrementing
<VarName>++ // Postfix incrementing
The increment operator is a unary operator which increments the value of its operand. It first adds the value 1 to the value of the variable <VarName> and then assigns the result to the variable.
In evaluating an expression in which <VarName> is used, the position of the increment operator determines when the increment occurs. When the increment operator precedes the variable <VarName> (prefix notation), the value of the variable is first incremented and then the expression is evaluated. When the increment operator follows the variable (postfix notation), the expression is first evaluated with the current value of the variable and then the value of the variable is incremented.
The variable <VarName> must contain a numeric or a date value when it is incremented. When it is not declared as LOCAL or STATIC or does not exist at compile time, it is considered to be of storage class MEMVAR unless an alias precedes it or it was declared as a field variable in a FIELD statement.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.