Difference between revisions of "COMMAND$"

From QB64 Wiki
Jump to navigation Jump to search
Line 1: Line 1:
COMMAND$ retrieves the DOS commandline arguments passed when running a program, the return is a string with all arguments in uppercase no matter what case they were originally.
The '''COMMAND$''' function returns the DOS commandline arguments passed when a program was run.
 




''Syntax:'' variable$ = COMMAND$
''Syntax:'' variable$ = COMMAND$
* Return is a [[STRING]] with all arguments in uppercase no matter what case they were originally.
* Useful when the programmer wants to add options to the command line of a program for later use by another.
* COMMAND$ is not available in QBasic versions below 4.





Revision as of 19:23, 28 September 2009

The COMMAND$ function returns the DOS commandline arguments passed when a program was run.


Syntax: variable$ = COMMAND$


  • Return is a STRING with all arguments in uppercase no matter what case they were originally.
  • Useful when the programmer wants to add options to the command line of a program for later use by another.
  • COMMAND$ is not available in QBasic versions below 4.


See also: SHELL, RUN


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage