- #1
Arez
- 1
- 0
Hello
I am very new to programming and fortran. I have a text file formatted the following way:
I want fortran to only read the data of the people I ask him to. If I ask for Luke and Sally, I want him to return their respective age, height and weight while assigning them to specific variables.
I have played around with various do loops with if statements but I can't get it to work properly... I don't know how to do this. Can anyone help ?
Thank you
I am very new to programming and fortran. I have a text file formatted the following way:
Name Peter John Sally Joseph Luke Vader etc...
age XXXX XXXX XXXX XXXX XXXX XXXX XXXX
height XXXX XXXX XXXX XXXX XXXX XXXX XXXX
weigh XXXX XXXX XXXX XXXX XXXX XXXX XXXX
etc...
age XXXX XXXX XXXX XXXX XXXX XXXX XXXX
height XXXX XXXX XXXX XXXX XXXX XXXX XXXX
weigh XXXX XXXX XXXX XXXX XXXX XXXX XXXX
etc...
I want fortran to only read the data of the people I ask him to. If I ask for Luke and Sally, I want him to return their respective age, height and weight while assigning them to specific variables.
I have played around with various do loops with if statements but I can't get it to work properly... I don't know how to do this. Can anyone help ?
Thank you
Last edited: