Assignment Command

The left hand side of an assignment is a variable or array element. Its type determines the type of the expression on the left hand side.


You can also use the familiar shorthand notation combining an operator with the equal sign.


When assigning a value to a pointer the expression can be a value or an address expression. A value will be assigned to the object that it points to. An address expression always begins with an at sign (@). The expression can be the address of a variable or array element, an address result returned from a function, or a positive constant value up to 65535.


A conditional assignment evaluates a condition and then updates the result accordingly. There are three different formats you can use. The first assigns zero if the condition is false and one if true. The left hand side must be a numeric or enumerated type.


Operator assignments also work for conditional assignments. This example increments the Count variable only when the condition is true.


The second conditional form returns a designated value when true. Otherwise the value is unchanged. In this case the assignment Variable may be a string.


The two value conditional form specifies both a true and a false values. The assignment Variable may be a string here as well. Note that for operator-assignments the only string operator is concatenation (!).

Intrinsic Function

If Condition