Global sub-routines (Call L <string>)
A global subroutine is called by
L <string> |
<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 then issued.
Programing Example
Global subroutines (Call L <string>)
;all global subroutines
%MAIN (main program)
N100 .....
N105 .....
N200 L gup_1.nc ;Direct call of a global subroutine by
;file name if program path is configured
N250 L D:\prog\ini_1.nc ;Direct call of a global subroutine by
;specifying absolute program path
N300 M30