Command-line arguments is part of Short Circuit's Console Program Basics selection.
Scripted main
See also Program name.

For parsing command line arguments intelligently, see Parsing command-line arguments.

Example command line:

myprogram -c "alpha beta" -h "gamma"

/* command line arguments, neko */
var argc = $asize($loader.args)
 
/* Display count and arguments, indexed from 0, no script name included */
$print("There are ", argc, " arguments\n")
 
var arg = 0
while arg < argc $print($loader.args[arg ++= 1], "\n")