Previous Topic: Miscellaneous FunctionsNext Topic: Argv - Returns a String Containing the nth Script Argument


Argc - Return the Number of Arguments Passed to the Script

Valid on NetWare, Symbian OS, UNIX, Windows and Windows CE

The argc function returns the number of arguments passed to the script. At least one argument, the name of the script, is always present.

Function format:

Argc() as Integer

The function returns an integer, which is the number of arguments passed to the script. A value of 1 indicates that only the script was passed.

Example:

Dim i as Integer
For i = 0 To argc() - 1
	Print(argv(i))
Next i