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

Home -> Community -> Usenet -> c.d.o.misc -> Re: debugging program using GOTO heavily

Re: debugging program using GOTO heavily

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Mon, 13 Dec 2004 19:55:53 -0500
Message-ID: <LsqdnXG225-upyPcRVn-jA@comcast.com>

"seanj" <seanjones_at_optonline.net> wrote in message news:1102956748.615353.20830_at_z14g2000cwz.googlegroups.com...
| LOOP
| BEGIN
|
| GOTO INSERTREC
| .....
|
| GOTO UPDATEREC
| .....
|
| GOTO DONEXTREC
| .....
|
|
| <<INSERTREC>>
| ...
| NULL;
|
|
| <<UPDATEREC>>
| ....
| NULL;
|
|
| <<DONEXTREC>>
| ....
| NULL
|
| END;
|
| ? WHEN PROCEDURE BRANCHES TO <<INSERTREC>> will the code in UPDATEREC
| and Get executed unless i explicitly tell it to GOTO DONEXTREC
|

avoid GOTO at all costs -- it always leads to poorly structured code

specific to your question, GOTO is not like a CASE or SWITCH statement (CASE is supported in 9i, it would be a good alternative to GOTO) -- once PL/SQL 'goes to' there is no lingering or implied effect... code is processed sequentially until another control structure is reached

++ mcs Received on Mon Dec 13 2004 - 18:55:53 CST

Original text of this message

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