CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   how to files with 4 characters in Fortran (http://www.cfd-online.com/Forums/main/110363-how-files-4-characters-fortran.html)

sp_song December 9, 2012 20:56

how to files with 4 characters in Fortran
 
Hello,

I have a question on how to read a list of data files using fortran 77:

For example, I have 200 files:

data.0100.inp
data.0101.inp
data.0102.inp
.....
data.0299.inp

I don't remember how to handle the characters 01** in fortran 77. Could you please comment on this?

Thanks a lot!

Steve

vinayender December 10, 2012 00:34

number to string command
 
Steve,

I remember there is some command in FOTRAN 77 to convert 'number to string'.
convert the number (file number) in to string with the command and
from this you get the ** in "" characters 01** ""
then add the string wich as ** characters and to another string with character 01

hope this helps


All times are GMT -4. The time now is 06:57.