- #1
bkent9
- 4
- 0
I have the following code with error- I want this general flow. Errors I get are missing ')' at the do while line,
syntax error on the line started with ****(not part of program added after fact)
and expecting END Program statement at line end do
counter=1
user_reaction =3
do while (counter .le. 3 .and. user_reaction .ne. 1 .and. user_reaction .ne. 2)
counter= counter+1
print *, "What reaction would like to look at:"
print *, "1)GP to EP"
print *, "2)GP to Klo"
if (counter.eq. 3) then
**** print *, "Please type a '1' for reaction GP to EP" &
"and '2' for the reaction GP to Klo"
end if
read *, user_reaction
end do
if (user_reaction .ne. 1 .and. user_reaction .ne. 2)
print *, "Failed to get a valid result. Program terminates in error."
STOP
end if
syntax error on the line started with ****(not part of program added after fact)
and expecting END Program statement at line end do
counter=1
user_reaction =3
do while (counter .le. 3 .and. user_reaction .ne. 1 .and. user_reaction .ne. 2)
counter= counter+1
print *, "What reaction would like to look at:"
print *, "1)GP to EP"
print *, "2)GP to Klo"
if (counter.eq. 3) then
**** print *, "Please type a '1' for reaction GP to EP" &
"and '2' for the reaction GP to Klo"
end if
read *, user_reaction
end do
if (user_reaction .ne. 1 .and. user_reaction .ne. 2)
print *, "Failed to get a valid result. Program terminates in error."
STOP
end if
Last edited: