Problem with PRINT command in FORTRAN 95

Asked

Viewed 95 times

1

I used a command OPEN to open a file, then I used the command WRITE to write a value to the string type file. However, when I use the command PRINT *,(with the asterisk, which should be the output pattern for the message to be displayed on the screen) after the command OPEN , the string that is placed in the PRINT does not appear on the screen and is stored in the file I wrote using the command WRITE.

Apparently, the standard output of the command PRINT, which should be write the value on the screen, switched to the drive associated with the file I opened using the command OPEN.

How can I change that?

  • Put your source code in for analysis

1 answer

1

I don’t remember facing that problem. You could insert the code snippet you are referring to?

One idea to solve is to test with WRITE to write on screen:

WRITE(*,'(a)') mystring

Browser other questions tagged

You are not signed in. Login or sign up in order to post.