Microsoft KB Archive/45419

= BUG: CSRLIN Can Return Incorrect Value for TEXTSIZE <> 12 =

Article ID: 45419

Article Last Modified on 11/21/2006



This article was previously published under Q45419



SYMPTOMS
The CSRLIN function can return the wrong value when the TEXTSIZE is set to other than TEXTSIZE 12, which is the default.

Microsoft has confirmed this to be a bug with Macintosh QuickBasic Version 1.00, Macintosh Basic Interpreter Version 3.00 (buglist3.00), and Macintosh Basic Compiler Version 1.00 (buglist1.00). We are researching this problem and will post new information as it becomes available.

When you use a TEXTSIZE other than 12, CSRLIN returns a value of (1 + actual line number) after printing the first print statement. You can work around this behavior by using the LOCATE statement to locate the first PRINT statement.

In the following code example, &quot;Hello&quot; and &quot;world&quot; should be printed on the same line, but they are not. The value for CSRLIN should be 1, but actually is 2:

Code Example
CALL TEXTSIZE(9)       ' TEXTSIZE (12) works correctly--default ' LOCATE 1,1           ' Add this line to eliminate problem. PRINT &quot;Hello&quot;; oldCSRLIN%=CSRLIN LOCATE CSRLIN, POS(0)  ' should locate at current cursor position PRINT &quot;world&quot; PRINT &quot;CSRLIN was &quot;;oldCSRLIN%  ' should be 1 -- actually 2

Additional query words: BasicCom MQuickB

Keywords: kbbug KB45419

-

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

© Microsoft Corporation. All rights reserved.