HP3000-L Archives

March 2004, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
KENT WALLACE <[log in to unmask]>
Reply To:
KENT WALLACE <[log in to unmask]>
Date:
Fri, 12 Mar 2004 08:06:11 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
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 *

ATOM RSS1 RSS2