The Arg function returns an argument string, or information about argument strings that were passed to the current procedure.
Syntax:
result = Arg( [ n [, option ] ] ) |
When only n is specified the Nth argument string is returned. If there are fewer arguments, an empty string is returned.
n must be a positive whole number
If option is Exists, the Arg function returns 1 if the Nth argument was passed to the current procedure, and 0 otherwise.
If option is Omitted, the Arg function returns 1 if the Nth argument was omitted, and 1 otherwise.
Examples:
say Arg() -- tells how many arguments are present say Arg( 2 ) -- shows the 2nd argument string say Arg( 5, 'E' ) -- tells whether or not the 5th argument string was passed say Arg( 4, 'O' ) -- tells whether or not the 4th argument string was omitted |