4.7) Understanding Decisions In Fortran
if statement
.
The decision in Example 8 is made by the If statement
on lines 6 to 10. If the test in the round brackets is true then it goes to line 7 (inside the if statement
) and prints that a
is greater than b
and once it has done that it will jump to line 10 and end the if statement
.
It is vitally important that you understand that once the program enters one part of the if statement
then it will always jump past the other tests and go to the endif