> -----Ursprungligt meddelande-----
> Från: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] För
> Paul Gilmartin
> Skickat: den 16 april 2012 15:11
> Till: IBM-MAIN@bama.ua.edu
> Ämne: Re: GO TO "cobol"
> 
> On Sun, 15 Apr 2012 23:15:19 -0700, Edward Jaffe wrote:
> >
> >The problem with GOTO is that the suitability of the target branch
> location is
> >not enforced by the compiler according to any structured discipline.
> >
> "C" commits this offense.  Shame on C.
> 
> >Premature terminations (posit/quit/admit) can almost always be handled
> with
> >LEAVE-type statements or immediate return from a subroutine. Some
> languages have
> >SIGNAL, EXIT, etc. which can help provide structured premature
> termination for
> >larger routines without resorting to the dreaded GOTO.
> >
> Rexx is a nightmare here.  The LEAVE statement, even with a specified
> target, won't exit a (nest of) procedure(s).  The SIGNAL statement
> trashes the DO nesting at the target level.  Shame on Rexx.

I can see that as a feature.  ;)
That prohibits some obfuscate like coding.  

(BTW, How do You imagine the behavior if the Signal DID NOT trash the DO 
nesting?  I mean, of what use would that be? As You have the CALL stmt.) 



Regards,
Thomas Berg
______________________________________________________
Thomas Berg   Specialist   AM/DQS   SWEDBANK AB (publ)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to