Thanks people.
I solved problem on the next way:
program prog
implicit none
double precision::kapa,r2,T2,a2
open (1,file='list.txt')
read (1,*) (kapa,r2,T2)
a2=sqrt(kapa*r2*T2)
print *, "a2=",a2
end program prog
Where input data in list.txt look like...
Hi everybody
I need to read some data from txt file in format for example like these:
a=150,b=300,c=500
Then I will use that data for further calculating. For example:
x=a+b+c
Is that possible in Fortran? Is there some command or format for READ command?
Please help!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.