Go to the first, previous, next, last section, table of contents.


Reversed Equate Miscellaneous Operators

The $ operator is very useful. It equates the contents of the top of the stack (or variable designator). So, for example, a string could be pushed as an argument to a function, and within that function this operator could be used to equate the argument. For example, here is a definition of strlen for any database field.

%%EQUATE STRLEN $>>Y 0>>X [<<Y<<X'0=~~;++X>>X]<<X

The function might be called with %%NAME#STRLEN. Note that the %% operator is used to put the field name on the stack. Then within the function the $ operator is used to evaluate the stack argument as an equate expression, thus getting the contents of the field.

The \ is the null operator. It does nothing, but is useful for separating operands or for escaping a newline character.


Go to the first, previous, next, last section, table of contents.