Microsoft KB Archive/71240

= BUG: Compiled Error 57 68020/68881 Option STRING$(32767,32) =

Article ID: 71240

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0
 * Microsoft QuickBasic Compiler for Macintosh 1.0
 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q71240



SYMPTOMS
Below is an example of a problem using the STRING$(32767,32) function when compiled with the Generate 68020 Code or Generate 68881 Code option.

The following code usually (incorrectly) gives error 57 (&quot;Device I/O Error&quot;) at run time on Apple System version 6.05. Sometimes Error 5 (&quot;Invalid Function Call&quot;) incorrectly occurs when the program tries to print the FRE function after the string assignment a$ = STRING$(32767,32). In other, different combinations of QuickBasic versions, compiler options, and System versions, wrong screen output, System Errors, or hanging may occur.

The program is compiled with all compiler options including &quot;Use default menus&quot; and &quot;Process events.&quot; The symptoms of this problem depend upon the version of the Apple System software.

This problem occurs in Microsoft QuickBasic versions 1.00, 1.00a, and 1.00b for Macintosh Systems. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

When you compile without the Generate 68020 Code or Generate 68881 Code options, or if you changed the string assignment to a$ = STRING$(32766,32), no problem occurs.



MORE INFORMATION
If compiled using QuickBasic version 1.00b running on Apple System version 6.05, you will get either error 57 or error 5.

When compiled with QuickBasic version 1.00b using System version 6.04 (other System versions not tested), the display of output is corrupt:

Instead of   data: 74096   stack: 12212  string: 78820 data: 74096  stack: 12212  string: xxxxx you get the following:   data: 74096   stack: 12212  string: 78820 data: data: 74096   74096   stack: stack: 12212   12212   string: string:  78820 78820 When tested with System version 6.04 using QuickBasic version 1.00, a system bomb ID=3 occurs when the program is compiled with either the 68020 or 68881 options.

Code Example
WINDOW 1,&quot;&quot;,(10,25)-(500,500) PRINT &quot;data: &quot;;FRE(-1);&quot;stack: &quot;;FRE(-2);&quot;string: &quot;;FRE(&quot;&quot;) a$ = STRING$(32767,32) PRINT &quot;data: &quot;;FRE(-1);&quot;stack: &quot;;FRE(-2);&quot;string: &quot;;FRE(&quot;&quot;) INPUT x  'for a pause WINDOW CLOSE 1 END

Additional query words: MQuickB

Keywords: kbbug KB71240

-

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

© Microsoft Corporation. All rights reserved.