argument$()
Return arguments passed to a subroutine or a function by the caller line. Used with subroutines or functions that take variable numbers of parameters. This command replaces outdated argC and argV commands
Syntax:
numberOfArguments = argument$()
argument = argument$( n )
It return the total number of arguments passed from the caller command if called without parameter or returns argument number n if called with parameter n , first argument starts at n = 1
You can omit the dollar symbol and type it as argument()
Example:
sub mySub(...)
for i= 1 to argument
prints( argument( i ) )
next
end sub
mySub("test1")
mySub("test2","more arguments",1,9)
waitkey
See also sub and function commands