Command-line argument view construction and printing helpers.
StringView values.CommandLine borrows the current process command-line storage.toCommandLine2 borrows the zero-terminated strings whose addresses are stored in the supplied contiguous Natx sequence.CommandLine and toCommandLine2 return the same ordered command view shape.StringView.String values.argumentAddress is the address of the first stored argument address.Natx values.argumentCount is the number of stored argument addresses in that sequence.printCommandLine prints one summary line that starts with Commands provided: and ends with the command count.CommandLine (-- commands): returns the current command-line arguments as one ordered command view.toCommandLine2 (argumentAddress argumentCount -- commands): builds the same view shape from one contiguous sequence of argument addresses.printCommandLine (commands --): prints the command count and then prints each command on a separate line enclosed in guillemets."CommandLine" use
"Array" use
"String" use
"control" use
{} Int32 {} [
addresses: Natx Array;
"alpha" storageAddress @addresses.append
"beta" storageAddress @addresses.append
commands: @addresses.data 2 toCommandLine2;
commands.size toString print
LF print
0
] "main" exportFunction
2