User-defined Functions

Function definitions have the form:

function-definition:
        function-declarator  function-body

function-declarator:
        func identifier
        proc identifier

function-body:
        { para-aliasopt  local-var-declopt  statement-listopt }

para-alias:
        para identifier-listopt ;

local-var-decl:
        auto identifier-listopt ;

identifier-list:
        identifier
        identifier , identifier-list

The identifier is declared to be a function using the keywords func or proc. There is no difference between func and proc. The word proc is more meaningful when the function serves as a procedure, i.e. a function which does not return a value.


[BACK] [FORWARD] [HOME] [UP] [HELP]