7.10 BC /D "Internal Error" Using Array in FIELD in WHILE (71790)



The information in this article applies to:

  • Microsoft Basic Professional Development System for MS-DOS 7.1

This article was previously published under Q71790

SYMPTOMS

When the following code example is compiled under the Microsoft Basic Professional Development System (PDS) version 7.10 using the BC /D option for run-time error checking, the compiler gives an "Internal Error near 851C".

This error does not occur if you compile without the /D option.

STATUS

Microsoft has confirmed this to be a bug in Microsoft Basic Professional Development System (PDS) version 7.10 for MS-DOS and MS OS/2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This problem does not occur in Microsoft Basic PDS 7.00 for MS-DOS and MS OS/2.

MORE INFORMATION

To work around this problem, do not compile with the /D option, or else change the code within the WHILE..WEND loop below. (For example, adding a "NQ=NQ" directly after the "NQ = NQ + 1" will prevent the error.)

Code Example

DEFINT I-N
DIM lfield(10, 10), xvar$(8, 20)
WHILE lfield(nfile, nq) <> 0
    FIELD #nfile, i AS xdummy$, lfield(nfile, nq) AS xvar$(nfile, nq)
    i = i + lfield(nfile, nq)
    nq = nq + 1
WEND
				

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB71790