| New Reply |
reading formatted input in fortran |
Share Thread | Thread Tools |
| Jul15-09, 05:33 AM | #1 |
|
|
reading formatted input in fortran
hello everyone,
I've to read this following line in fortran, I dont know to read the exponential form please help me 3.49E+03 2.73E+01 2.01E-01 9.16E-02 5.94E-02 5.11E-02 3.27E+04 3.27E+04 can somebody help me to write the format statement to read the whole line or can please tell me how should I read the exponential data eg 3.49E+01 and 9.44E-09 thank you, agalya |
| Dec25-10, 09:15 PM | #2 |
|
|
Taken from this site: http://elsa.berkeley.edu/sst/fmttop.html
|
| Dec26-10, 12:12 AM | #3 |
|
Mentor
|
If the data is separated by spaces as you have here, you can use the default format (*):
Code:
real a, b, c, d, e, f, g, h
open (unit=10, file='agalya.txt')
read (10, *) a, b, c, d, e, f, g, h
write (*, *) a, b, c, d, e, f, g, h
end
|
| New Reply |
| Thread Tools | |
Similar Threads for: reading formatted input in fortran
|
||||
| Thread | Forum | Replies | ||
| Fortran 90 help reading from file | Programming & Comp Sci | 2 | ||
| Problems reading binary file in FORTRAN | Programming & Comp Sci | 1 | ||
| Accessing Fortran Modules within a Fortran library from Fortran | Programming & Comp Sci | 0 | ||
| Fortran 90 question about reading files with text | Programming & Comp Sci | 1 | ||