"Invalid Function Call" BitTst Toolbox Example Error, Page 507 (47564)






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 ...
				

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