Previous Topic

Next Topic

Book Contents

Book Index

Rules of Variable Substitution

A KSL command can contain expressions including both KSL and AutoEdit variables. Variable substitution is performed in the following order:

  1. All KSL variables (variables preceded by a single % character) are substituted sequentially from left to right.

    Example

    TYPE '%A %%$PLUS 1'

    Assuming that the value of %A is 1, variable substitution begins with the KSL variable substituted as follows:

    TYPE '1 %%$PLUS 1'

  2. If the resulting expression contains AutoEdit symbols (in this example, %%$PLUS), variables are substituted sequentially from right to left until the symbol is assigned a value.

    In the above example, TYPE ‘1 %%$PLUS 1’ resolves to TYPE ‘2’.

The largest number that can be handled by mathematical AutoEdit operations is 231 - 1, that is, 2147483647.

Parent Topic

AutoEdit Variables