FIX: Entire Structure in DATA Fails to Cause Error (87474)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
- Microsoft FORTRAN PowerStation for MS-DOS 1.0
- Microsoft FORTRAN PowerStation for MS-DOS 1.0a
- Microsoft Fortran Powerstation 32 for Windows NT 1.0
This article was previously published under Q87474 SYMPTOMS
Applications compiled with Microsoft FORTRAN version 5.0 or 5.1 that
initialize entire structures in DATA statements may produce incorrect
results.
CAUSE
Initializing entire structures in a DATA statement is not permitted
(Microsoft FORTRAN version 5.1 "Reference" manual, page 140), but no error
or warning is emitted by the compiler. Subsequent use of that structure
variable may lead to incorrect results.
RESOLUTION
To initialize structure variables through DATA statements, specify every
element of the structure separately.
STATUS
Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions
5.0 and 5.1 for MS-DOS and OS/2, and version 5.1 for Windows. This problem
was corrected in FORTRAN PowerStation version 4.0.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbfix kbLangFortran KB87474 |
---|
|