The args (or args(NULL)) command returns the list of arguments of a function. The element at index 0 is the name of the function, the remaining are the arguments passed to the function. This allows you to define functions with a variable number of arguments.
Note that args() will not work, the command must be called as args or args(NULL). You can also use (args)[0] to get the name of the function and (args)[1] to get the first argument, etc., but the parentheses about args is mandatory.
Input:
then:
Output:
Input:
total():={ local s,a; a:=args; s:=0; for (k:=1;k<size(a);k++){ s:=s+a[k]; } return s; }
then:
Output: