Navigation: Language Reference > 11 - Assignments > Assignment Statements >====== Simple Assignments ====== | |
destination | = | source |
destination | The label of a variable or runtime property. |
source | A numeric or string constant, variable, procedure, expression, or data structure property. |
The = sign assigns the value of source to the destination; it copies the value of the source expression into the destination variable. If destination and source are different data types, the value the destination receives from the source is dependent upon the Data Conversion Rules.
Example:
StringVar STRING(10)
LongVar LONG
RealVar REAL
CODE
StringVar = 'JONES' !Variable = string constant
RealVar = 3.14159 !Variable = numeric constant
RealVar = SQRT(1 - Sine * Sine) !Variable = procedure return value
LongVar = B + C + 3 !Variable = numeric expression
StringVar = CLIP(FirstName) & ' ' Initial & '. ' & LastName
!Variable = string expression
StringVar = '10' !Assign numeric data to string then
Longvar = StringVar !Automatic data conversion results
!and Longvar will contain: 10
See Also: