specifies one or more
arguments for the function. You specify character arguments by placing
a dollar sign ($) after the argument name. In the following example, function
myfunct(arg1, arg2 $, arg3, arg4 $); arg1 and arg3 are
numeric arguments, and arg2 and arg4 are character arguments.
expression
specifies the value
that is returned from the function.
Optional Arguments
VARARGS
specifies that the
function supports a variable number of arguments. If you specify VARARGS,
then the last argument in the function must be an array.
specifies that the
function returns a character value. If $ is not specified, the function
returns a numeric value.
length
specifies the length
of a character value.
Default:8
KIND='string'
GROUP='string'
specifies a collection
of items that have specific attributes.
Details
The FUNCTION statement
is a special case of the subroutine declaration that returns a value.
You do not use a CALL statement to call a function. The definition
of a function begins with the FUNCTION statement and ends with an
ENDSUB statement.