qb45advr.hlp (
Topic list)
COMMAND$ Function Programming Example
◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
COMMAND$ Function Programming Example
CMD_EX.BAS is a program file in the subdirectory ADVR_EX that illustrates
the COMMAND$ function. To look at the program in the View window and,
optionally, to run it, load CMD_EX.BAS using the File menu's Open Program
command.
The program breaks the command line into separate arguments and stores
them in an array. Each argument is separated from adjoining arguments
by one or more blanks or tabs on the command line.
The following is a sample command line and output for a stand-alone
executable file (assumes program name is arg.exe):
arg one two three four five six
Sample Output
Number of arguments = 6
Arguments are:
ONE
TWO
THREE
FOUR
FIVE
SIX