FIX: F2725 Error, Array of Structures Element in READ IolistLast reviewed: September 11, 1997Article ID: Q51284 |
5.00 | 5.00
MS-DOS | OS/2
kbtool kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSAn attempt to compile an application fails and the compiler generates the following message:
error F2725 illegal input list item CAUSEThe application includes a READ statement where the iolist contains elements of an array of records.
RESOLUTIONTo address this error, perform one of the following two procedures:
STATUSMicrosoft has confirmed this to be a problem in FORTRAN version 5.0 for MS-DOS and OS/2. This problem was corrected in FORTRAN version 5.1 for MS-DOS and OS/2.
MORE INFORMATIONAccording to page 218 of the Microsoft FORTRAN "Reference" manual for versions 5.0 and 5.1, an application can declare an array of structures. According to page 214, the iolist can contain structure elements. The following code example demonstrates this problem. Sample Code #1 C Compile options needed: None
STRUCTURE /SPECLIMIT/ REAL*4 A END STRUCTURE RECORD /SPECLIMIT /LIMIT(5) N = 1 LIMIT(N).A = 34.56 READ (*, 1000) LIMIT(N).A ! array causes error1000 FORMAT (F6.2) ENDThe following code example demonstrates one method to address this problem.
Sample Code #2C Compile options needed: None
STRUCTURE /SPECLIMIT/ REAL*4 A END STRUCTURE REAL*4 TMP RECORD /SPECLIMIT /LIMIT(5) N = 1 LIMIT(N).A = 34.56 READ (*, 1000) TMP LIMIT(N).A = TMP1000 FORMAT (F6.2) END |
Additional reference words: 5.00 buglist5.00 fixlist5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |