
B-63944EN/02 PROGRAMMING 16.CUSTOM MACRO
- 429 -
Limitation
- Infinite loops
When DO m is specified without specifying the WHILE statement, an
infinite loop ranging from DO to END is produced.
- Processing time
When a branch to the sequence number specified in a GOTO
statement occurs, the sequence number is searched for. For this
reason, processing in the reverse direction takes a longer time than
processing in the forward direction. Therefore, in the case of
processing in the reverse direction, use the WHILE statement for
repetition to reduce processing time.
- Undefined variable
In a conditional expression that uses EQ or NE, a <null> and zero
have different effects. In other types of conditional expressions, a
<null> is regarded as zero.
Sample program
The sample program below finds the total of numbers 1 to 10.
O0001;
#1=0;
#2=1;
WHILE[#2 LE 10]DO 1;
#1=#1+#2;
#2=#2+1;
END 1;
M30;