Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

Open a file Programmatically in Fortran.

I want a small code in Fortran that opens a .txt file when executed. I have Lahey90 V4.5 to compile this program.

Thank you.
Avatar of cup
cup

You didn't say whether you wanted to read from it or to write to it.

To open a file for reading on channel nnnn

open (nnnn, 'afile.txt', status='old')

To open for writing

open (nnnn, 'afile.txt', status='new')
Avatar of Aiysha

ASKER

cup,
I might be asking for too much, but can you please send me a entire program, so I can just compile it..I am very new to fortran..

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of cup
cup

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial