827
Assignment Operators
The following assignment operators are included in the general syntax of the
language:
+=
Add to. Can be used with numerics or strings:
Numeric example: A+=1 is the same as A=A+1.
String example: A$+="G" is the same as A$=A$+"G".
=
Subtract from. Not valid for strings.
Numeric only: B-=A+1 is the same as B=B-(A+1).
*=
Multiply by. Can be used with numerics or strings.
Numeric example: B*=A+1 is the same as B=B*(A+1)
String example: A$*=5 is the same as A$=A$+A$+A$+A$+A$.
/=
Divide by. Not valid with strings.
Numeric only: B/=A+1 is the same as B=B/(A+1).
^=
Exponentiation. Raise to. Not valid with strings.
Numeric only: B^=A is the same as B=B^A.
|=
Modulus / remainder from division. Not valid with strings.
Numeric only: B|=A is the same as B=MOD(B,A)
LIKE Operator
Use the LIKE operator for string comparisons. The ProvideX default is to take the
string expression on the left and compare it to the string mask on the right. You can
apply all the regular expression rules of the MSK( ) Function, p.484; e.g.,
IF A$ LIKE mask THEN ..
is the same as ...
IF MSK(A$, mask)<> 0 THEN ..
This operator may be used in conditionsl structures, such as IF..THEN..ELSE,
To make conversions from Thoroughbred easier, set the 'TL' parameter to ON. With the
'TL' parameter set, the LIKE operator emulates the Thoroughbred matching of
patterns. For more information, refer to the 'TL' System Parameter, p.686.
Apostrophe Operator
The apostrophe operator is used to assign, retrieve, list, and make dynamic changes
to a given control or object's properties. For full details on the syntax and use of the
apostrophe, refer to the Apostrophe Operator in the next section.