P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 326 of 909
BREAK
Break from CASE or WHILE Loop
APPLICATION:
Program execution and flow control
DESCRIPTION:
Causes immediate exit from a WHILE or SWITCH control block
(loop)
EXECUTION:
Immediate
CONDITIONAL TO:
N/A
LIMITATIONS:
For downloaded code only; cannot be used through a serial
port!
READ/REPORT:
N/A
WRITE:
N/A
LANGUAGE ACCESS:
N/A
UNITS:
N/A
RANGE OF VALUES:
N/A
TYPICAL VALUES:
N/A
DEFAULT VALUE:
N/A
FIRMWARE VERSION:
5.x and later
COMBITRONIC:
N/A
DETAILED DESCRIPTION:
BREAK is used by the WHILE...LOOP and SWITCH...ENDS flow-control blocks (loops). In both
structures, if BREAK is encountered, the program jumps out of that particular WHILE loop or
SWITCH structure. If the control blocks are nested, BREAK only exits the WHILE loop or
SWITCH structure that it is currently in.
The most common use of BREAK is to end each CASE of a SWITCH control structure. Without
the BREAK statement, the program would continue to execute into the next CASE, even if it is
not true.
EXAMPLE:
SWITCH
a
CASE
1
("Hiya!",#13)
CASE
2
("Lo there!",#13)
BREAK
CASE
3
("Me here!",#13)
BREAK
DEFAULT
("Urp!",#13)
BREAK
ENDS
Part 2: Commands: BREAK
Содержание SmartMotor
Страница 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...
Страница 909: ...PN SC80100003 002 Rev L ...