System information

SECTION ONE – PROGRAM CONFIGURATION
Program
Normally a program number is specified at the beginning of a program, and a program end code
(M99, M02, M30) is specified at the end of the program. Neither is required; however, it may be
advantageous to omit the program end code from programs that are used as subprograms. An end
program code is assumed when the end of the main program is encountered.
Main program, subprogram, and subroutines
When it is necessary to machine the same pattern at many places on a part, a program for the
pattern should be created. This is called a subprogram. When a “M98" or “Call” (subprogram
call) appears in the main program, the commands of the subprogram are performed before
execution of the next block of the main program.
8