Microsoft KB Archive/32325

= Cannot View Data Files in the List Window: Use Another Editor =

Article ID: 32325

Article Last Modified on 11/3/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0
 * Microsoft BASIC Interpreter 3.0 for 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 &quot;&&quot;, &quot;!&quot;, or &quot;#&quot; 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 &quot;MYFILE.DAT&quot; FOR OUTPUT AS #1 FOR I = 1 TO 5 PRINT #1, USING &quot;####.#&quot;; A;  'The &quot;;&quot; at the end represses CR/LF NEXT

Additional query words: MQuickB

Keywords: KB32325

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.