Is it possible to pass values accessable to QBasic programs at runtime?
For example, of program READ.BAS is used to read records from a data file specified by the user. It might begin like this:
1000 INPUT "Give File Name ", D$
1010 OPEN D$ FOR INPUT AS #1
1020 .......
When executed by
QBASIC /RUN READ
the user will be prompted to supply a file name.
My question is, can this file name be suppied at the QBASIC call, eg:
QBASIC /RUN READ(filename)
Thanks.
Bill
Passing values to QBasic programs
Maybe you want to something like this:
The Command you started the program:
Code in Chooser.bas:
OR:
You only just use the parameter for your handling.
The Command you started the program:
Code: Select all
QBASIC /RUN Chooser.bas File01.bas
Code: Select all
OPEN COMMAND$ FOR INPUT AS #1
READ #1, a$
CLOSE #1
Code: Select all
RUN COMMAND$