What does this Fortran code mean:
IF (J1-3) 20, 20, 21
21 J1 = J1 - 3
20 IF (J2-3) 22, 22, 23
23 J2 = J2 - 3
22 CONTINUE
I’ve seen in old project and I don’t have any idea what this IF with numbers (labels) means.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is an arithmetic
ifstatement from FORTRAN 77. Adapted from the FORTRAN 77 specification (emphasis mine):For the example in your question, from the last sentence above,
J1-3 < 0statement 20 will be executedJ1-3 = 0statement 20 will also be executedJ1-3 > 0statement 21 will be executedEdit: A modern and much more readable way to write this would be: