BUG: Nested Loops and FAR Arrays Produce Incorrect ResultsLast reviewed: July 11, 1995Article ID: Q70280 |
The information in this article applies to:
SYMPTOMSCompiling a program that uses nested loops and FAR arrays causes one of the following run-time problems:
RESOLUTIONPossible solutions include
STATUSMicrosoft has confirmed this to be a bug in the products listed above. This is not an issue with FORTRAN PowerStation, since FAR is not a supported attribute.
MORE INFORMATIONThe following sample can be used to demonstrate the problem.
Sample code
PROGRAM NestedLoopc INTEGER*4 Channel(10), IBuff[FAR](100) Count = 1 DO 1 Loop1=1,10 Channel(Loop1) = Loop1 DO 2 Loop2=1,10 IBuff(Count) = Loop1 + Loop2 Count = Count + 1 2 CONTINUE 1 CONTINUEc c line number 13 c ENDDuring execution this program generates the R6001 error under MS-DOS or a protection violation under OS/2. Substituting line 13 with the following statement will generate the F6207 error during execution under DOS or a protection violation under OS/2:
WRITE(*,'(I8)') Channel(1)Substituting line 13 with the following statement will generate incorrect results during execution under DOS or a protection violation under OS/2:
WRITE(*,*) Channel, IBuff |
Additional reference words: 5.00 5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |