CALL function( arguments ... ) [ > mstring] [ONERROR statement]
The CALL command is used to invoke user defined or intrinsic functions. Argument expressions passed to the function should be separated by commas. If there are no arguments, the brackets enclosing the arguments may be omitted. If the CALLed function has a return value, it will be discarded when the function is invoked using the CALL statement.
In order to capture all terminal output of a subprocedure, the ">" redirection clause may be used. All text output of the subprocedure will be captured and placed in the provided multi-line string variable (type MString).
The statement supports an optional ONERROR statement which will be invoked if an error occurs during processing of the called function. Alternatively, the NOERROR postfix may be used instead of using ONERROR with a statement.
Note that functions with return values can also be invoked directly from within an expression.
Example:
CALL DBOpen( "abc.txt", "r" ) ... CALL DBClose( "abc.txt" ) ONERROR PRINT "DBClose failed."
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.