Program Number %
A program usually begins with a % character that is followed by the program number ranging from 1 through 9999 maximum. Each program can be directly started or be called as a subroutine by other programs. Main program and subroutines cannot be discriminated by their program numbers, but by the end of program statement:
The end of program is marked by the corresponding M function or G function:
-
M30 = End of main program
-
G99 = End of subroutine
Program numbers ≥ 8000 are usually considered separately. This range is normally used for storing cycle programs.
