Basic PDS FontDemo "Bad Font File" Error Under MS-DOS 2.x (78955)



The information in this article applies to:

  • Microsoft Basic Professional Development System for MS-DOS 7.0
  • Microsoft Basic Professional Development System for MS-DOS 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 "bad font file" 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 "bad font file" 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


Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB78955