Navigation: Templates > Template Language Reference > Complete Alpha Listing >====== #SET (assign value to a user-defined symbol) ====== | |
#SET( symbol,value )
#SET | Assigns a value to a single-valued user-defined symbol. |
symbol | A single-valued user-defined symbol. This must have been previously declared with the #DECLARE statement. |
value | A built-in or user-defined symbol, string constant, or an expression. |
The #SET statement assigns the value to the symbol. If the value parameter contains an expression, you may perform mathematics during source code generation. The expression may use any of the arithmetic, Boolean, and logical operators documented in the Language Reference. If the modulus division operator (%) is used in the expression, it must be followed by at least one blank space (to explicitly differentiate it from the Template symbols). Logical expressions always evaluate to 1 (True) or 0 (False). Clarion language procedure calls (those supported in EVALUATE()) and built-in template procedures are allowed.
Example:
#SET(%NetworkApp,'Network')
#SET(%MySymbol,%Primary)
#FOR(%File)
#SET(%FilesCounter,%FilesCounter + 1)
%FileStructure
#ENDFOR
See Also: #DECLARE