Syntax
PROCEDURE procname(var1,...varN)
<optional local MAP statements, with optional STATIC prefix>
<optional XGETARGs>
<nearly any kind of statements>
XPUTARG n,<expression> ! return (1 or more) parameters
ENDPROCEDURE
Notes
Procedures are exactly like User-defined Functions (which see, for many details) except that they cannot be used as expressions, and they don't return an expression value. (Like functions, or SBX routines, they can update any of the parameters passed.) They also use similar buy separate keywords:
FUNCTION PROCEDURE
ENDFUNCTION ENDPROCEDURE (also END FUNCTION and END PROCEDURE)
EXITFUNCTION EXIPROCEDURE
To call the procedure, use a form of the CALL statement:
CALL procname(var1,...varn)