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 GuidelinesJobs |
What is the different between "return 1" and "return"?
|
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