Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Cursor Question

Re: Cursor Question

From: Kenneth C Stahl <kstahl_at_lucent.com>
Date: Mon, 21 Jun 1999 08:49:28 -0400
Message-ID: <376E34D8.65FD06D4@lucent.com>


As I have pointed out repeatedly, GOTO is not necessarily bad. If it easily and clearly solves a problem that would otherwise require complex and obtuse code, then it is appropriate to use GOTO.

Forget that you ever read those few sentances in K&R. Dennis Richie was wrong. Unfortunately too many programmers accepted what he said as gospel truth. Fortunately Stroustrup understood this problem when he developed C++ - you realize, of course, that a throw-catch sequence is the same as a GOTO - it just doesn't use the GOTO word, that's all. In fact, exceptions in C++ can be used in ways that far exceed that which GOTO can since GOTO in C is limited to the scope of a single function.

Also, in PL/SQL the EXIT statement is merely a synonym for GOTO. The fact that it is spelled EXIT instead of GOTO doesn't mean that its functionality is different. However, with EXIT you cannot control the destination of the GOTO whereas with the GOTO statement you can send execution to a specific point.

DBAOracle wrote:

> Am I the only person that cringes seeing the goto in this code? As an old C
> programer, goto's make me sad...
>
> Robert
Received on Mon Jun 21 1999 - 07:49:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US