The information in this article applies to:
SYMPTOMSAn attempt to compile an application fails and the compiler may generate the following message: Alternately, the application compiles without error but does not generate any output. CAUSE
The application declares an array of structures that contain REAL*4
elements, REAL*8 elements, or mixed-type elements (for example, one
INTEGER*4 element and one COMPLEX*8 element). The application attempts to
write the entire array without specifying a subscript.
RESOLUTIONTo address this error, modify the source code to print each element of the array individually instead of all at once. STATUSMicrosoft has confirmed this to be a problem in FORTRAN versions 5.0 and 5.1 for MS-DOS and OS/2. This problem was corrected in FORTRAN PowerStation, version 1.0. MORE INFORMATIONThe following code example demonstrates this problem. Sample Code #1
To work around this problem, use an implied-DO loop to print each
elements of the array of structures. The following code example
demonstrates this approach.
Sample Code #2
The following code example, that uses an assumed-size array of
structures, compiles without error but does not produce any output.
Sample Code #3
Compiling this code example with the /Od compiler option switch
specified causes a code generation error.
An application cannot print an assumed-size array as an array. The application must specify a subscript and print each element individually. One solution to this problem is to use an adjustable- sized array. Pass the length of the structure array to the subprogram with the array itself. Use the array length to terminate the loop that prints the individual array elements. The following code example demonstrates this process. Sample Code #4
Additional query words: 5.00 5.10 buglist5.00 buglist5.10 fixlist1.00
Keywords : |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |