Microsoft KB Archive/78955

= Basic PDS FontDemo &quot;Bad Font File&quot; Error Under MS-DOS 2.x =

Article ID: 78955

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q78955



SUMMARY
When running the FONTDEMO.BAS program example provided with Microsoft Basic PDS 7.0 and 7.1 under MS-DOS versions earlier than 3.0, the font files cause the error message &quot;bad font file&quot; to be displayed.

This message occurs because versions of MS-DOS earlier than 3.0 do not allow use of the ACCESS keyword with the OPEN statement. This is a limitation by design under MS-DOS versions earlier than 3.0. You can change the FontDemo to work under MS-DOS versions 2.x as shown further below.

Note that Microsoft designed the Basic PDS for MS-DOS versions 3.0 and later, as stated on the product box.

This information applies to Microsoft Basic Professional Development System (PDS) versions 7.0 and 7.1 for MS-DOS.



MORE INFORMATION
The &quot;bad font file&quot; error can be traced to the following OPEN statement in the function RegisterFonts in the file FONTB.BAS: OPEN FileName$ For BINARY ACCESS READ AS FileNum% In versions of MS-DOS earlier than 3.0, you cannot use the ACCESS keyword with the OPEN statement. This is a limitation by design under MS-DOS versions earlier than 3.0.

To work around this limitation in FontDemo, change the above OPEN statement to the following: OPEN FileName$ For BINARY AS FileNum% For more information about this limitation, query on the following words:

OPEN and ACCESS and Advanced and Feature and Unavailable

Additional query words: BasicCom 7.00 7.10

Keywords: KB78955

-

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

© Microsoft Corporation. All rights reserved.