Problem with the PRINT command in FORTRAN 95

1

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

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

How can I change this?

    
asked by anonymous 29.07.2017 / 04:16

1 answer

1

I do not remember dealing with this problem. Would you like to insert the code snippet you are referring to?

An idea to solve is to test with WRITE to write on the screen:

WRITE(*,'(a)') mystring
    
22.08.2017 / 23:11