Article ID: 20538
Article Last Modified on 11/21/2006
B=2 : B ' This is the same as B=2 : CALL BBecause B has not been defined as a subprogram, BASIC assumes that you are calling the machine-language routine at the address (2) contained in B. Because you have not yet placed a proper machine-language routine at this address, you usually will get a System Error and must reboot. This is an example of an "implied CALL", a special CALL syntax that does not require an explicit CALL statement. For more information about implied CALLs, refer to the CALL statement documentation.
C - D = EYou might type a statement like the above by mistake, but this perfectly legal syntax tells BASIC to use an equal sign (=) as a relational operator instead of the assignment operator. When C, D, and E are zero (by default), then the above expression D=E returns a value of true (-1). C minus -1 equals +1. The value of the expression C-D=E is thus +1. The one-line program C-D=E will therefore make an implied CALL to the machine code routine at the address +1, which is not a valid routine; at this point, the computer hangs or you get a System Error. (For more information, please look up "relational operators" in the index of the "Microsoft BASIC Compiler Version 6.00 for MS OS/2 and MS-DOS: BASIC Language Reference.")
code# = VARPTR( MyCode%(0) ) 'get address of my machine code array code# arg1%,arg2% 'call my routine
Additional query words: BasicCom MQuickB
Keywords: KB20538