Subroutines
Note:
4-3-5
DO WHILE/UNTIL Loop
Note:
4-4
Subroutines
4-4-1
Call
SECTION 4 CX-Supervisor Script Language
In this example, the fill for 'Ellipse_1' is gradually removed 20 times (100
times/-5).
Loop statements should be used with caution, as they consume processor
time while they are running and some other parts of the system may not be
updated.
Syntax
DO WHILE expression
statementblock
LOOP
or
DO
statementblock
LOOP WHILE expression
or
DO UNTIL expression
statementblock
LOOP
or
DO
statementblock
LOOP UNTIL expression
Remarks
Argument
Description
expression
The expression may be a point, or a calculation of
constants and/or points that produces a result.
statementblock
One or more statements to be executed multiple times
depending on expression.
Typical Example
DO WHILE dooropen == TRUE
Message
continuing")
LOOP
DO
nextchar = Mid (Mystring, position, 1)
position = position + 1
LOOP UNTIL nextchar = "A"
Loop statements should be used with caution, as they consume processor
time while they are running and some other parts of the system may not be
updated.
Syntax
CALL subroutine (arguments)
Remarks
("You
must
shut
the
door
before
29