Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Cursor Question
If you really want something that boggles one's mind with all sorts of
implications, consider the setjmp()/longjmp() of C/C++. Read the man pages for
those two functions and your mind will begin to race. In effect it is a GOTO, but
it is only a backwards goto. It has its uses however when writing signal
handlers.
The thing is, if a program is absolutely peppered with GOTOs it probably indicates a problem with the basic design of the program. But, when it is a practical way to handle a specific problem then it is an acceptable solution.
I have a story I tell on myself that cured me of weenieism. I once wrote a C program that contained conditional operators nested 5 deep (you know, the (condition) ? if_true : if false) in two different branches. It was ingenious and I thought it was a beautiful solution - until I had to modify it a few months later and found I couldn't even read my own code. Ever since then I have believed the KISS maxim.
Ken
Marc Mazerolle wrote:
> I use to think this way (back in my C/C++ days) but have you ever tried to
> follow code that uses Oracle "exception" to it's limit ? That is spaghetti.
>
> One well placed "GOTO", i think, is acceptable.
>
> Regards,
>
> Marc Mazerolle
>
> 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 Tue Jun 22 1999 - 08:51:26 CDT