assignment statements
Syntax
variable = expression
variable += expression
variable -= expression
variable := expression
Description
Use assignment statements to assign a value to a variable. The variable can be currently unassigned (that is, one that has not been assigned a value by an assignment statement, a statement, or any other statement that assigns values to variables) or have an old value that is to be replaced. The assigned value can be a constant or an expression. It can be any data type (that is, numeric, character string, or the null value).
Use the operators += , -= , and := to alter the value of a variable. The += operator adds the value of expression to variable. The -= operator subtracts the value of expression from variable. The := operator concatenates the value of expression to the end of variable.
Use the system variable @NULL to assign the null value to a variable:
variable = @NULL
Use the system variable @NULL.STR to assign a character string containing only the null value (more accurately, the character used to represent the null value) to a variable:
variable = @NULL.STR
Example
EMPL=86
A="22 STAGECOACH LANE"
X='$4,325'
B=999
PRINT "A= ":A,"B= ":B,"EMPL= ":EMPL
B+=1
PRINT "X= ":X,"B= ":B
This is the program output:
A= 22 STAGECOACH LANE B= 999 EMPL= 86
X= $4,325 B= 1000