#EQUATE (declare and assign value to a user-defined symbol)


Top  Previous  Next

 

#EQUATE( symbol,value )

#EQUATE

Declares and assigns a value to a single-valued user-defined symbol.

symbol

A single-valued user-defined symbol. This must not have been previously declared.

value

A built-in or user-defined symbol, string constant, or an expression.

The #EQUATE statement declares the symbol and assigns the value to the symbol. This is directly equivalent to a #DECLARE statement followed by a #SET to assign it a value.

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:

#EQUATE(%NetworkApp,'Network')

#EQUATE(%MySymbol,%Primary)

 

See Also:     #DECLARE ,#SET