Subject: | |
From: | |
Reply To: | |
Date: | Fri, 12 Mar 2004 08:06:11 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
No.
IF IMAGE-ERROR
CALL INTRINSIC "QUIT" USING \21\.
Kent Wallace
>>> Jeff Kell <[log in to unmask]> 03/11/04 05:48PM >>>
KENT WALLACE wrote:
> Hmmmm
>
> I was told in 1986 when I worked at Boeing, never to use "GO TO"'s.
> I have had this discussion off the list. I have written a few
> languages and have compiled the following list.
>
> Language USE of "GO TO"
>
> COBOL It's a sin, some use it to exit paragraph but I won't.
I have one major bone to pick with this one, and that is for error
handling. Sure, you can check IF NOT SUCCESSFUL PERFORM IMAGE-ERROR
even though you'll never come back (IMAGE-ERROR might, for example, do a
DBEXPLAIN then STOP RUN).
In such cases, I think it is much more proper (and sensible) to just
bite your lip and GO TO IMAGE-ERROR.
I suppose the purist would:
IF NOT SUCCESSFUL
PERFORM IMAGE-ERROR,
STOP RUN,
END-IF.
:-)
Jeff
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|