BUG: Access Violation or R6018 Executing IF Statement
Article ID: 114979
Article Last Modified on 10/17/2003
APPLIES TO
- Microsoft Fortran PowerStation 1.0a for MS-DOS
- Microsoft FORTRAN PowerStation 32
This article was previously published under Q114979
SYMPTOMS
For FORTRAN PowerStation 32, an access violation occurs and for FORTRAN
PowerStation, runtime error R6018 and an unexpected heap error occur
when you execute code where:
- There is an IF statement alone (not "IF... THEN...").
.
- There is a call to a subroutine that takes a character argument in the
IF block.
- The actual argument passed to the subroutine is a character expression
that includes concatenation of characters.
- The IF expression is evaluated as ".FALSE" so that the call is not
carried out.
RESOLUTION
Use one of the following to work around the problem:
- Use a block IF (that is, "IF... THEN ...") rather than an IF statement
alone.
-or-
- Assign the character expression to a temporary variable instead of
passing it directly to the subroutine.
STATUS
Microsoft has confirmed this to be a bug in Microsoft FORTRAN
PowerStation, version 1.0a for MS-DOS and version 1.0 for Windows NT.
We are researching this problem and will post new information here
in the Microsoft Knowledge Base as it becomes available.
Additional query words: 1.00 1.00a
Keywords: KB114979