Keyboard
Programming Manual
45
SATO Europe
FOR…[EXITFOR]…NEXT
Description
Executes a series of instructions by a specified number of times in a loop.
(As opposed to DO …LOOP which executes until a condition is met)
Syntax
FOR variable= I TO J [STEP K]
Statements
NEXT variable
Remarks
I, J, K are numeric expressions
I:
the initial value of the counter
J:
the final value of the counter
K:
The increment of the counter. If the K parameter is ignored, the default
increment is 1.
The maximum numbers of IF…THEN…ELSE, FOR…NEXT, WHILE…WEND, and
DO…LOOP statements available in one program is 40.
Example
The following sample program prints out the sum of numbers between 1 and 10:
SUM=0
FOR I=1 TO 10
SUM=SUM+I
NEXT I
PRINT SUM
Содержание Smart Keyboard
Страница 1: ...SATO Smart Keyboard Programming manual...
Страница 90: ...Programming Manual Keyboard SATO Europe 88...
Страница 93: ......