The simple assignment statement assigns a value to a variable.
{LET }variable = expression
where:
variable where the result of expression is to be stored.
expression is any valid DataBasic expression.
The word LET is optional and is implied by the = sign. It is therefore omitted from any examples. You can, however, include it if you wish to enhance readability.
ABC = 500
assigns the value 500 to variable ABC.
ABC = 500 X = (ABC + 100)/2
assigns the arithmetic expression (ABC + 100)/2, which evaluates to 300, to the variable X.
VALUE = "THIS IS A STRING"
assigns the string THIS IS A STRING to the variable VALUE.
SUB = VALUE[6,2]
performs the substring extraction, where VALUE = "THIS IS A STRING", and assigns the substring "IS" to variable SUB. Refer to the sections Substring Extraction and Substring Assignment.