What is the different between "return 1" and "return"?
What is the different between "return 1" and "return"?
(OP)
What is the different between "return 1" and "return"?
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
What is the different between "return 1" and "return"?
|
Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.
Here's Why Members Love Eng-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: What is the different between "return 1" and "return"?
Calling program:
...
CALL SUB1(X,Y,*10)
Y= ....
...
10 Z= ....
SUBROUTINE SUB1(ARG1,ARG2,*)
...
ARG2 = ...
IF(ARG2.LE.0)THEN
...
RETURN 1
ELSE
...
RETURN
END IF
...
The subroutine will specify the alternate return (to statement labeled 10 in the calling program) if ARG2 is not positive. Otherwise return is made to the line after the CALL.
All of this is found in any good Fortran reference, available in textbook form or online.
RAR