Saving GW-Basic/BASICA ASCII File to Use with QBasic (80745)
The information in this article applies to:
- Microsoft MS-DOS operating system 5.0
- Microsoft MS-DOS operating system 5.0a
- Microsoft MS-DOS operating system 6.0
- Microsoft MS-DOS operating system 6.2
- Microsoft MS-DOS operating system 6.21
- Microsoft MS-DOS operating system 6.22
This article was previously published under Q80745 SYMPTOMS
If you try to run a program created with GW-Basic or BASICA in
MS-DOS QBasic, the following error message may be displayed:
SYNTAX ERROR
CAUSE
This message means that either a syntax modification may be needed to
meet QBasic language rules, or the file format is not ASCII. All
QBasic programs must be in ASCII format.
By default, GW-Basic and BASICA save programs in binary format that
QBasic cannot read. A program written in GW-Basic or BASICA must be
saved in ASCII format before it can be loaded into QBasic.
WORKAROUND
To eliminate the error, do the following:
- Make a backup copy of the original program written in
GW-Basic or BASICA.
- Locate GWBASIC.EXE or BASICA.EXE and execute the program.
- Use the LOAD (F3) command to load the program to be used in
QBasic. For example, type the following:
- Use the LIST (F1) command to verify the program's contents.
- Use the SAVE (F4) command with the A option to save the program
in ASCII format. For example, type the following:
- Exit GW-Basic or BASICA with the SYSTEM command.
The program is now in ASCII format and can be used in QBasic.
To execute the program in QBasic, do the following:
- Run QBASIC.EXE.
- From the File menu, choose Open, and enter the program file that
was saved in ASCII format.
- From the Run menu, choose Start.
If the text is garbled with control characters and character set
characters, the program is probably not in ASCII format. Exit QBasic
and save the file in ASCII as explained above.
For more information about BASICA and GW-Basic conversion, query on
the following words in the Microsoft Knowledge Base:
Modification Type: | Major | Last Reviewed: | 5/10/2003 |
---|
Keywords: | KB80745 |
---|
|