Cannot View Data Files in the List Window: Use Another Editor (32325)



The information in this article applies to:

  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0
  • Microsoft BASIC Interpreter for Apple Macintosh

This article was previously published under Q32325

SUMMARY

This article applies to the Microsoft BASIC Interpreter Version 3.00 and the interpreter environment of the Microsoft QuickBASIC Compiler 1.00 for the Apple Macintosh.

Viewing files in the List window that are not BASIC program source files may display unexpected results. Files loaded into the List window are parsed and converted into an internal format with the assumption that the file is a BASIC source program.

A different editor, such as Apple's Edit, should be used to view data files.

MORE INFORMATION

The following transformations will take place if a file is loaded into the List window:

  1. Spaces separating numeric data may be removed.
  2. Numbers may have "&", "!", or "#" numeric type symbols appended to them.
  3. Each tab character is converted into a single space.
  4. BASIC reserved words are boldfaced.
  5. Option characters will cause a syntax error and halt file loading.
If you inadvertently load a data file into BASIC, you should not edit or save it, since it will be saved in the changed format.

To view data files or other files that are not BASIC program source files, you may use a text editing Desk Accessory, Edit, Microsoft Word, or another text editing program.

Edit is included with QuickBASIC 1.00 and BASIC Compiler 1.00. If you only want to view the file, and not make changes, you may use the File Browser program included with QuickBASIC 1.00.

A text editing Desk Accessory (installed in the Apple menu) is very useful, and there are many good ones that are shareware or in the public domain, available through user groups or electronic bulletin boards.

The following is an example:

If the MYFILE.DAT file created by the following program is loaded into the BASIC List window, the spaces will appear to be removed between numbers. If MYFILE.DAT is loaded into another editor, such as Apple Edit, the file will display as expected. The following is a code example:
A = 1.2
OPEN "MYFILE.DAT" FOR OUTPUT AS #1
FOR I = 1 TO 5
  PRINT #1, USING "####.#"; A;   'The ";" at the end represses CR/LF
NEXT
				

Modification Type:MajorLast Reviewed:11/3/2003
Keywords:KB32325