Microsoft KB Archive/58674: Difference between revisions
From BetaArchive Wiki
(importing KB archive) |
m (Text replacement - "&" to "&") |
||
Line 36: | Line 36: | ||
<br /> | <br /> | ||
# The trap number (& | # The trap number (&HA8CO) is wrong in the example; however, it is correct in the description above (&HA8BF). | ||
# Also in the example, the rectangle parameter r%() is incorrectly passed (without VARPTR) in the ToolBox statement. | # Also in the example, the rectangle parameter r%() is incorrectly passed (without VARPTR) in the ToolBox statement. | ||
# The rectangle argument is listed as "r%", which signifies a single integer, instead of as "r%()", which signifies an integer array. | # The rectangle argument is listed as "r%", which signifies a single integer, instead of as "r%()", which signifies an integer array. | ||
Line 49: | Line 49: | ||
<br /> | <br /> | ||
The incorrect example from Page 516 is as follows: | The incorrect example from Page 516 is as follows: | ||
<pre class="codesample"> TrapNo%=& | <pre class="codesample"> TrapNo%=&HA8CO | ||
Toolbox "P", TrapNo%, r%(0), (startAngle%), 45 | Toolbox "P", TrapNo%, r%(0), (startAngle%), 45 | ||
</pre> | </pre> | ||
It should read as follows: | It should read as follows: | ||
<pre class="codesample"> TrapNo%=& | <pre class="codesample"> TrapNo%=&HA8BF | ||
Toolbox "P", TrapNo%, VARPTR(r%(0)), (startAngle%), 45 | Toolbox "P", TrapNo%, VARPTR(r%(0)), (startAngle%), 45 | ||
</pre> | </pre> | ||
Line 61: | Line 61: | ||
SetRect r%(0), 10, 10, 100, 100 | SetRect r%(0), 10, 10, 100, 100 | ||
startAngle% = 10 | startAngle% = 10 | ||
TrapNo%=& | TrapNo%=&HA8BF | ||
Toolbox "P", TrapNo%, VARPTR(r%(0)), (startAngle%), 45 | Toolbox "P", TrapNo%, VARPTR(r%(0)), (startAngle%), 45 | ||
</pre> | </pre> |
Latest revision as of 14:14, 21 July 2020
Article ID: 58674
Article Last Modified on 11/21/2006
This article was previously published under Q58674
SUMMARY
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:
- The trap number (&HA8CO) is wrong in the example; however, it is correct in the description above (&HA8BF).
- Also in the example, the rectangle parameter r%() is incorrectly passed (without VARPTR) in the ToolBox statement.
- The rectangle argument is listed as "r%", which signifies a single integer, instead of as "r%()", which signifies an integer array.
MORE INFORMATION
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:
TrapNo%=&HA8CO Toolbox "P", TrapNo%, r%(0), (startAngle%), 45
It should read as follows:
TrapNo%=&HA8BF 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 TrapNo%=&HA8BF Toolbox "P", TrapNo%, VARPTR(r%(0)), (startAngle%), 45
Additional query words: MQuickB
Keywords: KB58674