The number of parameters passed to a function
The value of the _NARGS variable represents the number of
arguments passed to the function. This variable is local to each
function.
This example uses the _NARGS variable to print the list of
values passed to the function:
define print_values ()
{
variable arg;
if (_NARGS == 0)
{
message ("Nothing to print");
return;
}
foreach (__pop_args (_NARGS))
{
arg = ();
vmessage ("Argument value is: %S", arg.value);
}
}
- slangrtl
-
__class_id,
__class_type,
__eqs,
__get_reference,
__is_initialized,
__pop_args,
__push_args,
_nargs,
_typeof,
array_info,
dup,
is_defined,
is_struct_type,
length,
typecast,
typeof
|