Please enable JavaScript to view this site.

A-Shell Development History

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 functions 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.) The also use similar to separate keywords:

FUNCTION        PROCEDURE

ENDFUNCTION     ENDPROCEDURE

EXITFUNCTION    EXIPROCEDURE

 

To call the procedure, use a form of the CALL statement:

CALL procname(var1,...varn)