Article ID: 31273
Article Last Modified on 11/21/2006
This article was previously published under Q31273
SYMPTOMS
A "Type Mismatch" error does not occur if the INPUT statement receives any of the following noninteger-type symbols in an integer variable:
- d (double-precision exponential)
- e (exponential)
- ! (single-precision exponential)
- # (double-precision exponential)
Instead, a value of 0 (zero) is input. QuickBasic automatically converts the noninteger-type symbol to zero (0) instead of giving a "Type Mismatch" error message.
STATUS
Microsoft has confirmed this to be a bug in QuickBasic versions 3.00, 4.00, 4.00b, and 4.50 for MS-DOS; in Microsoft Basic Compiler versions 6.00, 6.00b for MS-DOS and MS OS/2; in Microsoft Basic Professional Development System versions 7.00 and 7.10 for MS-DOS and OS/2; and in Microsoft GW-Basic Interpreter versions 3.20, 3.22, and 3.23 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
NOTE: The "Type Mismatch" error message occurs in the above products, except for Basic PDS 7.00 and 7.10, if you input only a percent sign ("%", which marks integer constants) in response to INPUT for an integer variable. In Basic PDS 7.00 and 7.10, a % is correctly input with a value of zero.
The following code demonstrates the above problem:
' A value of zero is input if the following noninteger-type ' characters are input into an integer variable: d (double exponential), ' e (single precision exponential), !, and # INPUT "ENTER AN INTEGER ",i% PRINT i% END
Additional query words: QuickBas BasicCom B_GWBasicI B_BasicCom buglist3.00 buglist4.00 buglist4.00b buglist4.50 buglist6.00 buglist6.00b buglist7.00 buglist7.10 buglist3.20 buglist3.22 buglist3.23
Keywords: KB31273