Category: System
Syntax:
sysArgCount:Int()
None.
Int
Returns how many arguments were given after the program's name.
The shell splits the command line into arguments: spaces separate them, and quotes keep one that has spaces in it whole ("level 1.txt" is one argument, without its quotes). Read them with sysArg(1) to sysArg(sysArgCount()). Returns 0 when there are none.
View detailed documentation online
UseConsole
Import "BBRuntime64.decls"
Function Main()
Local i:Int
For i = 1 To sysArgCount()
Print ToString(i) & ": " & sysArg(i)
Next
Return False
EndFunction
BambooBasic © 2026 Michael Denathorn