The second external call syntax is in the form of the $ZCALL function. GT.M used this syntax before external calls were standardized. The format for the $ZCALL function is:
$ZC[ALL](expr1[,expr2,...])
The first expression specifies the name of the external routine
The remaining optional expressions specify the arguments that $ZCALL() passes to the external routine
The external call table must contain an entry corresponding to the name specified by expr1; if not, GT.M generates a run-time error.
Each external call returns a string value consisting of zero (0) or more pieces made up of the arguments returned by the named external routine. The string is delimited by commas.
Example:
GTM>WRITE $ZC("trnlnm","GTM$GBLDIR")
This WRITEs the result of a $ZCALL() that invokes the routine "trnlnm", passing the argument "GTM$GBLDIR".
Example:
GTM>SET A=$ZC("AVERAGE",53,76,80)
This SETs A to the value returned from a $ZCALL() that invokes the routine "AVERAGE", passing the arguments 53, 76, and 80.