STE 58762 2-21
2.8 PROGRAMS
This section describes SCOL programs.
2.8.1 Program Declaration
A program has to have the following basic structure. If it does not, it is not a valid program.
PROGRAM <name of your program>
Contents of your program
END
A program is made up of everything from the PROGRAM statement to the END statement.
Write a program name after the PROGRAM statement. For example, if you want to call your
program "George," write PROGRAM GEORGE (and not PROGRAM <GEORGE>.) (Note,
however, that the program name becomes an identifier). Put the contents of your program
between the PROGRAM statement and the END statement.
Example)
PROGRAM SAMPLE 'Program name "SAMPLE"
REMARK SAMPLE 'Comment
SPEED=20 'Set the movement speed to 20% of the maximum speed.
MOVE Al 'Move the robot to position Al.
DELAY 0.5 'Wait for 0.5 sec.
MOVE A2 'Move the robot to position A2.
DELAY 0.5 'Wait for 0.5 sec.
END 'End of program
As shown in the example, the body of the program is composed of statements made up of an
arrangement of SCOL commands. A new line is created every time you push the "RETURN" (or
"ENTER") key when writing (or editing) the program. Up to 1 30 characters can be contained in a
single line. You may add spaces as you wish in order to make the program neater and easier to
read. Note how comments are entered with ' marks.
Note)
No spaces can be placed between characters structuring a word of a command and identifier.