Microsoft Knowledge Base Email Alertz

(71240) - 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 (Device I/O Error) at run time on Apple System...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 71240 - Last Review: October 23, 2003 - Revision: 3.0

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

This article was previously published under Q71240

On This Page

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 ("Device I/O Error") at run time on Apple System version 6.05. Sometimes Error 5 ("Invalid Function Call") 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 "Use default menus" and "Process events." 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,"",(10,25)-(500,500)
       PRINT "data: ";FRE(-1);"stack: ";FRE(-2);"string: ";FRE("")
       a$ = STRING$(32767,32)
       PRINT "data: ";FRE(-1);"stack: ";FRE(-2);"string: ";FRE("")
       INPUT x   'for a pause
       WINDOW CLOSE 1
       END
				

APPLIES TO
  • Microsoft QuickBasic Compiler for Macintosh 1.0
  • Microsoft QuickBasic Compiler for Macintosh 1.0
  • Microsoft QuickBasic Compiler for Macintosh 1.0
Keywords: 
kbbug KB71240
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate