FIX: Concatenation of Substring Gives Incorrect Results (70243)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 4.0
- Microsoft FORTRAN Compiler for MS-DOS 4.01
- Microsoft FORTRAN Compiler for MS-DOS 4.1
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 4.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q70243 SYMPTOMS
Programs compiled with Microsoft FORTRAN versions 4.0, 4.01, 4.1,
and 5.0 that concatenate substrings having a variable for a
substring index, can give incorrect results or hang the machine when
executed under MS-DOS, or result in a protection violation when executed
under OS/2.
CAUSE
The problem is usually observed when the concatenation occurs inside a
function call, or inside OPEN or IF statements.
RESOLUTION
To avoid this problem, assign the concatenated expression to a
temporary character variable and use the temporary variable in the
program.
STATUS
Microsoft has confirmed this to be a problem in FORTRAN versions 4.0,
4.01, 4.1, 5.0, and 5.1. This problem was corrected in FORTRAN
PowerStation.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbfix KB70243 |
---|
|