Microsoft KB Archive/47564

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 13:14, 21 July 2020 by X010 (talk | contribs) (Text replacement - "&" to "&")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


"Invalid Function Call" BitTst Toolbox Example Error, Page 507

Article ID: 47564

Article Last Modified on 11/21/2006

This article was previously published under Q47564

SUMMARY

On Page 507 in the "Microsoft QuickBASIC for Apple Macintosh: Language Reference," the example for the BitTst ROM Toolbox call incorrectly calls the routine with a "P" call type rather than a "B" call type as specified in the Calltype on Page 506. You will get an "Invalid function call" using the example as shown on Page 506.

Note that you must also always invoke the ToolBox "i" statement (to initialize) before you can begin to use the ToolBox statement.

The following is the correct example:

a% = 0
bResult% = 0
ToolBox "i"
TrapNo% = &HA85D
bitOffset& = 3
bytePtr& = VARPTR(a%)
ToolBox "B", TrapNo%, (bytePtr&), (BitOffset&), bResult%
IF bResult% THEN ...
                


Additional query words: MQuickB

Keywords: KB47564