Microsoft KB Archive/58674

From BetaArchive Wiki
Knowledge Base

Correction for PaintArc, QuickBASIC ToolBox Example, Page 516

Article ID: 58674

Article Last Modified on 11/21/2006

This article was previously published under Q58674


The description of the PaintArc ToolBox routine on Page 516 of the "Microsoft QuickBASIC for Apple Macintosh: Language Reference" manual is incorrect. There are three errors in the description, as follows:

  1. The trap number (&HA8CO) is wrong in the example; however, it is correct in the description above (&HA8BF).
  2. Also in the example, the rectangle parameter r%() is incorrectly passed (without VARPTR) in the ToolBox statement.
  3. The rectangle argument is listed as "r%", which signifies a single integer, instead of as "r%()", which signifies an integer array.


For a list of the Macintosh system traps, see Appendix C of "Inside Macintosh: Volume III," by Apple Computer, published by Addison-Wesley.

The incorrect example from Page 516 is as follows:

   Toolbox "P", TrapNo%, r%(0), (startAngle%), 45

It should read as follows:

   Toolbox "P", TrapNo%, VARPTR(r%(0)), (startAngle%), 45

The following is a complete example of invoking the PaintArc routine through QuickBASIC's ToolBox statement:

   Toolbox "i"           'Initialize toolbox and variables
   DIM r%(3)
   SetRect r%(0), 10, 10, 100, 100
   startAngle% = 10
   Toolbox "P", TrapNo%, VARPTR(r%(0)), (startAngle%), 45

Additional query words: MQuickB

Keywords: KB58674