
B-63943EN-2/01 5.MACRO VARIABLES
- 93 -
Caution
CAUTION
The same common variable can be used in any of
conversational macros, auxiliary macros, and execution
macros, but caution is necessary. If the common variable
used in an execution macro and a user program is the same
as the common variable used in a conversational macro and
an auxiliary macro, writing may occur from the execution
macro while writing is performed from the conversational
macro or auxiliary macro because execution macros have a
higher processing level than conversational macros and
auxiliary macros, with the result that the values written by the
execution macro may be overwritten by the remaining
processing of the conversational macro or auxiliary macro.
For this reason, make sure that the variables used in
execution macros are different from those used in
conversational macros and auxiliary macros.
Example
Bit 0 of #100 is used as the execution macro flag, and bit 1 of
#100 is used as the auxiliary macro flag.
To set bit 0 to ON: #100=#100 OR 1
To set bit 1 to ON: #100=#100 OR 2
Execution
macro
Auxiliary
macro
:
#100 = #100 OR 1 ;
:
:
#100 = #100 OR 2 ;
:
Auxiliary macro
Execution macro
The value of #100 read at the start of auxiliary macro
processing is written to #100 after auxiliary macro processing,
so a value written during execution macro processing may be
lost.