* In '''QB64 only''', COMMAND$ can work as an array to return specific elements passed to the command line. COMMAND$(2) would return the '''spaced''' second parameter passed at the command line. This can be used on modern operating systems to successfully retrieve file names and arguments which contain spaces properly. (versions after May 20, 2015)
* Use the [[_COMMANDCOUNT]] function to find the number of spaced parameters passed to a program via the command line. (versions after May 20, 2015) '''{{text|See ''Example 2''|green}}'''.
* Reading the spaced command options in the '''COMMAND$(i)''' array in a loop can also be done and reading a COMMAND$ without parameters is also possible. (versions after May 20, 2015) '''{{text|See ''Example 3''|green}}'''.
* COMMAND$ was '''not available in QuickBasic versions below 4.0''' and returned [[UCASE$|uppercase]] [[STRING]] parameters no matter what case they were sent originally.
''Example 2:'' Program gets the number of parameters passed to the program, and then prints those parameters to the screen one at a time.
{{CodeStart}}count = {{Cl|_COMMANDCOUNT}}
{{Cl|FOR...NEXT|FOR}} c = 1 {{Cl|TO}} count
{{Cl|PRINT}} {{Cl|COMMAND$}}(c) 'or process commands sent
{{Cl|NEXT}}
{{CodeEnd}}
{{OutputStart}}-1
a data file
{{OutputEnd}}
: ''Explanation: If we start ''ThisProgram.exe'' with the command line '''ThisProgram -l "a data file"''', COMMAND$ will return a single string of "-1 a data file" which might be hard to process and interpret properly, but COMMAND$(1) would return "-l" and COMMAND$(2) would return the quoted "a data file" option as separate entries for easier parsing and processing.