M source programs can be executed either from the shell or from GT.M (Direct Mode).
M commands and functions that may initiate auto-ZLINKing are:
GT.M auto-ZLINKs the routine only under these conditions:
For additional information on $ZSOURCE and $ZROUTINES, refer to Chapter 8: “Intrinsic Special Variables”.
Example:
GTM>ZLINK "taxes"
If ZLINK finds taxes.m or taxes.o, the command adds the routine taxes to the current image. When ZLINK cannot locate taxes.o, or when it finds taxes.o is older than taxes.m, it compiles taxes.m, producing a new taxes.o. Then, it adds the contents of the new object file to the image.
ZLINK cannot change a currently active routine, (e.g., a routine displayed in a ZSHOW "S" of the stack). ZLINK a currently active routine by first removing it from the M stack, using ZGOTO, or one or more QUITs. For additional information on the functionality of ZGOTO and ZSHOW, see their entries in Chapter 6: “Commands”.
To maintain compatibility with other editions of GT.M that do not permit the percent sign (%) in a file name, GT.M uses an underscore (_) in place of the percent in the file name.
Example:
GTM>zlink "_MGR"
This ZLINK links the M routine %MGR into the current image.