Microsoft KB Archive/45947

= FIX: x MOD 65536& Gives System Error ID=2 in Interpreter =

Article ID: 45947

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q45947



SYMPTOMS
Using the MOD operator (modulo arithmetic) with a divisor of 65,536 causes a &quot;Division by Zero Error&quot; and a System Bomb with system error ID=02. Other long integer or integer divisors show no problem. This error occurs in both the Binary and Decimal versions of QuickBasic's environment. The problem does not appear in compiled applications.

Microsoft has confirmed this to be a bug with the interpreter in Microsoft QuickBasic version 1.00 for the Macintosh. This problem is corrected in QuickBasic version 1.00b.

Code Example
PRINT 10 MOD 65536& ' Should print 10, but crashes interpreter. Note that the QuickBasic editor is designed to automatically append an ampersand (&) character to long-integer constants. 65,536 is equal to 64K (64 times 1024).

Additional query words: MQuickB

Keywords: kbbug kbfix KB45947

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.