Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: debugging program using GOTO heavily
"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