Microsoft KB Archive/61673

= &quot;Illegal Function Call&quot; with TAB & LOCATE in Compiled Program =

Article ID: 61673

Article Last Modified on 11/21/2006



This article was previously published under Q61673



SYMPTOMS
This article documents a special case where the TAB function placed between two LOCATE statements causes an &quot;Illegal Function Call&quot; in a subroutine. This problem occurs only in a compiled (.EXE) program using QuickBasic version 4.50.



STATUS
Microsoft has confirmed this to be a bug in Microsoft QuickBasic version 4.50. This problem was corrected in Microsoft Basic Professional Development System (PDS) version 7.00 for MS-DOS (fixlist7.00).

This problem does not occur in Microsoft QuickBasic versions 4.00 or 4.00b or in Microsoft Basic Compiler versions 6.00 and 6.00b for MS-DOS.



MORE INFORMATION
The problem does not occur if you do one or both of the following:


 * 1) Remove the TAB function from between the Locate statements. Instead of TAB, use a literal such as &quot; &quot; with the appropriate number of spaces, or use the STRING$ function.
 * 2) Compile with /x.

Code Example
' Compile line: BC tab.bas; ' Link line:   LINK tab ;

DECLARE SUB test (col) CALL test(20)

SUB test (col) LOCATE col, 1 PRINT TAB(2); LOCATE col, 1    'This line gives the &quot;Illegal Function call&quot; END SUB

Additional query words: QuickBas BasicCom SR# S900417-103 B_BasicCom buglist4.50

Keywords: KB61673

-

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

© Microsoft Corporation. All rights reserved.