Microsoft KB Archive/47564

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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