home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!agate!agate.berkeley.edu!dodd
- From: dodd@mycenae.cchem.berkeley.edu (Lawrence R. Dodd)
- Newsgroups: comp.lang.fortran
- Subject: Re: Jumping from nested subroutine to main directly?
- Message-ID: <DODD.92Nov21071326@mycenae.cchem.berkeley.edu>
- Date: 21 Nov 92 15:13:26 GMT
- References: <1992Nov21.015026.17820@netcom.com>
- Reply-To: dodd@roebling.poly.edu
- Organization: Dept of Chemical Engineering, Polytechnic Univ, NY, USA
- Lines: 22
- NNTP-Posting-Host: mycenae.cchem.berkeley.edu
- In-reply-to: jchauvin@netcom.com's message of Sat, 21 Nov 1992 01:50:26 GMT
-
-
- >>>>> "John" == John H. Chauvin <jchauvin@netcom.com> writes:
-
- John> Is it possible to transfer control from a nested subroutine directly to the
- John> main routine without have to execute multiple returns from all the
- John> subroutines in between? I would like a way of exiting directly to the main
- John> routine when a error is detected six or seven subroutines down.
-
- I would be interested too. I don't think that there is an easier way than
- doing
-
- .
- .
- call a
- if (topmost) return
- .
- .
-
- (where `topmost' is set to .true. within `a') for all subsequent calling
- routines.
-
- Larry
-