Macintosh QuickBASIC PrintVerRec Code Resource Prints Garbage (65937)






This article was previously published under Q65937

SUMMARY

When using the PrintVerRec pure code resource example to print out the contents of BASIC's version record, the information returned is garbage.

You can correct this problem by copying the STR# resource from TESTPCR.LSC to QuickBASIC or to the PrintVerRec resource using ResEdit, as described below.

This information applies to Microsoft QuickBASIC versions 1.00 and 1.00a for the Apple Macintosh.

MORE INFORMATION

The version record, VERREC, provides your library routines with information about the QuickBASIC program calling them. Page 456 of "Microsoft QuickBASIC for Apple Macintosh: Language Reference" manual describes the information that the version record contains.

The pure code resource, PrintVerRec, uses the STR#9999 resource, which is in the TESTPCR.LSC example. PrintVerRec.c can be found in "User Libraries:MBPC Rsrcs:LSC PCR". TESTPCR.LSC can be found in "User Libraries:MBPC Rsrcs:TestPCR". PrintVerRec uses the STR#9999 resource to display the information from the print record. Without this resource, PrintVerRec will start displaying whatever information is located at the memory location where it looks for the STR#9999 resource.

You can correct this problem by copying the STR# resource from TESTPCR.LSC to QuickBASIC or to the PrintVerRec resource using ResEdit.

  1. OPEN TESTPCR.LSC using ResEdit.
  2. Select the STR# resource with a single click.
  3. Choose COPY from the EDIT menu.
  4. Open Microsoft QuickBASIC (b) or (d), or your code resource.
  5. Choose PASTE from the EDIT menu.
  6. Exit ResEdit, choosing OK to save the file.

Modification Type: Minor Last Reviewed: 1/9/2003
Keywords: KB65937