home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4393 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  1.2 KB

  1. Path: sparky!uunet!olivea!spool.mu.edu!agate!agate.berkeley.edu!dodd
  2. From: dodd@mycenae.cchem.berkeley.edu (Lawrence R. Dodd)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: Jumping from nested subroutine to main directly?
  5. Message-ID: <DODD.92Nov21071326@mycenae.cchem.berkeley.edu>
  6. Date: 21 Nov 92 15:13:26 GMT
  7. References: <1992Nov21.015026.17820@netcom.com>
  8. Reply-To: dodd@roebling.poly.edu
  9. Organization: Dept of Chemical Engineering, Polytechnic Univ, NY, USA
  10. Lines: 22
  11. NNTP-Posting-Host: mycenae.cchem.berkeley.edu
  12. In-reply-to: jchauvin@netcom.com's message of Sat, 21 Nov 1992 01:50:26 GMT
  13.  
  14.  
  15. >>>>> "John" == John H. Chauvin <jchauvin@netcom.com> writes:
  16.  
  17.   John> Is it possible to transfer control from a nested subroutine directly to the 
  18.   John> main routine without have to execute multiple returns from all the 
  19.   John> subroutines in between?  I would like a way of exiting directly to the main 
  20.   John> routine when a error is detected six or seven subroutines down.
  21.  
  22. I would be interested too.  I don't think that there is an easier way than
  23. doing
  24.  
  25.      .
  26.      .
  27.      call a
  28.      if (topmost) return
  29.      .
  30.      .
  31.  
  32. (where `topmost' is set to .true. within `a') for all subsequent calling
  33. routines.
  34.  
  35. Larry
  36.