Assignment |
DEVELOPER |
|
|
Purpose |
The Assignment (=) statement assigns the value of a constant to a variable, the value of one variable to another variable, or the value of an expression to a variable. |
Syntax |
variable = operand |
Operation |
variable is any valid alphanumeric, wide, or numeric variable. |
Remarks |
The operand must be of the same data type as the variable (i.e. either both alphanumeric, both wide, or both numeric.) |
Example |
Assume that #A = 10, $B = ‘A01’, $C = "‘PROIV TECHNOLOGY", and |
Intermediate Assignment |
There are four special formats of the Assignment (=) statement that automatically increment, decrement, multiply, or divide the current value of the numeric variable on the left-hand-side of the equation. The value is defined by the value of the numeric constant, variable, or expression on the right-hand side of the equation, and places the new value in the variable on the left-hand-side. |
Syntax |
operand1 operator = operand2 |
Operation |
operand1 is any valid numeric variable. |
Example |
Assume that COUNTER, TOTAL, NEW-SALE, and RETURNS are numeric variables. |
Topic ID: 520022