Command: args

Syntax

args <assign> {, <assign> ... }

Description

Define parameters to a macro, procedure or user function.

Parameters

<ident> = {&}<type>

Switches

None

Notes

There may be multiple args statements in a macro, function or procedure, but they must be the first non-comment lines. If an args statement is encountered anywhere else, it is ignored.

The parameter types must match in type and number the parameters given in the macro/function invoke command, e.g. an exec command. If they do not, the macro or function is aborted without executing.

There is one exception to the previous note. <type> may be defined as generic in which case any type of identifier may be passed as a parameter and will be passed by address. Note: constant values or string literals may not be passed to a command frame expecting a generic parameter.

Some identifier types, e.g. structure objects, can only be passed by address. In such cases the & preceding <type> is by default assumed and may be omitted.

Examples

args arg1=&numeric, arg2=numeric

args source=string, destination=&string

args my_ident=generic

See Also

Commands:

exec, function, procedure

Identifiers:

scope (atable)

Structures:

atable_struct