SET.ARG

SET.ARG

Top  Previous  Next

 

The SET.ARG statement updates a subroutine argument value based on its position in the argument list. It is intended for use with subroutines declared with the VAR.ARGS option.

 

 

Format

 

SET.ARG n, value

 

where

 

nis the argument list position, numbered from one.

 

valueis the value to be set.

 

 

Subroutines declared with the VAR.ARGS option may have a variable number of arguments. Although each argument must have a name assigned to it in the SUBROUTINE statement, it is often useful to be able to process a series of arguments by indexing this list.

 

The SET.ARG statement sets the value of argument n. The actual number of arguments passed may be determined using the ARG.COUNT() function. Use of an argument position value less than one or greater than the number of arguments causes the program to abort.

 

 

See also:

ARG(), ARG.COUNT, ARG.PRESENT(), SUBROUTINE