PSS ID Number: 147756
Article Last Modified on 11/2/1999
C Compile options needed: none
integer len
len = 66
open(1,file='t.out',form='unformatted')
C The following line causes an Access violation
write(1) char(len-1) ! Comment this line for workaround
C To workaround the problem perform intermediate calculations
C in a temporary variable and use it in the char() expression.
C i = len - 1 ! Uncomment this line for workaround
C write(1) char(i) ! Uncomment this line for workaround
close(1)
end
The following code demonstrates the problem writing binary output:
C Compile options needed: none
integer len
len = 66
open(1,file='t.out',form='binary')
C The following line causes an Access violation
write(1) char(len-1) ! Comment this line for workaround
C To workaround the problem perform intermediate calculations
C in a temporary variable and use it in the char() expression.
C i = len - 1 ! Uncomment this line for workaround
C write(1) char(i) ! Uncomment this line for workaround
close(1)
end
Additional query words: 4.00
Keywords: kbLangFortran KB147756
Technology: kbAudDeveloper kbFORTRANPower400NT kbFortranSearch kbZNotKeyword8