Global sub-routines (Call L <string>)

A global subroutine is called by

L <string>


File name of the global subroutine without quotation marks, max 83 characters (including file extension and possibly an absolute or relative path name)

Global subroutines (GSUB) are independent program units in a separate file. A global subroutine is called by its complete file name (including file extension). A global subroutine can also consist of local subroutines and a main program part.

It is only necessary to specify the name of the global subroutine by % in the file to indicate the start of the main program part after defining the local subroutines. It can be skipped if the file contains no local subroutines.

The calling main program is also stored as an independent program unit in another file. Global subroutines can be called form all main programs.

The end of a global subroutine is marked by the functions M17 or M29. A program abort is also possible with M02 or M30. A warning is is then issued.

Programing Example


Global subroutines (Call L <string>)

;all global subroutines

%MAIN (main program)

N100 .....

N105 .....

N200 L  ;Direct call of a global subroutine via

                 ;File name if program path is configured

N250 L D:\prog\  ;Call a global subroutine by

                         ;Specify absolute program path

N300 M30