Microsoft KB Archive/75413

= BUG: Subpgm Run-time &quot;Error 35&quot;: Compiled w/ Line Length=255 =

Article ID: 75413

Article Last Modified on 11/21/2006



This article was previously published under Q75413



SYMPTOMS
Attempting to run a compiled program that contains a line exactly 255 characters in length may result in run-time &quot;Error 35&quot; (&quot;Undefined subprogram&quot;). This problem will occur if a line exactly 255 characters in length is placed between a call to a subprogram and the SUB statement itself. This problem occurs for a program compiled under Microsoft QuickBasic for Macintosh. This problem does not occur in the QuickBasic development environment.

Microsoft has confirmed this to be a bug with programs compiled with Microsoft QuickBasic versions 1.0, 1.0a and 1.0b for the Apple Macintosh. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
The QuickBasic environment (interpreter) supports a line length of 255 characters. Attempting to exceed this line length correctly gives a &quot;Line too long&quot; error while editing in the QuickBasic environment. The compiler will compile a line of exactly 255 characters without error, but the resulting compiled program may fail with an &quot;Error 35&quot; (&quot;Undefined subprogram&quot;) at run-time if the line appears anywhere between a call to a SUB program and the SUB program itself.

The only workaround for this problem is to shorten the 255-character line to 254 characters or less.

Below is a code example that demonstrates the problem: CALL TEMP 'The line below must contain exactly 255 characters for the problem to 'occur: 'Put 254 X's here after the remark (the ' counts as one character). END

SUB TEMP STATIC END SUB

Additional query words: MQuickB 1.00 1.00a 1.00b

Keywords: kbbug KB75413

-

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

© Microsoft Corporation. All rights reserved.