Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Art S. Kagel said that using goto to exit deeply nested blocks on error is more elegant than testing condition variables, and that he uses globals only with a warning comment. The rest of the thread was a joking tangent about assembly JSR versus GOSUB, different assembly languages and COBOL ALTER. No technical outcome.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Art S. Kagel — — source: Usenet: comp.databases.informix
Michael Segel wrote:
> Art S. Kagel wrote:
> Gee Mr. Kagel, such a mensch.
Ahh, shucks Mikey. 8-P
> BTW, if you have to use a GOTO and I don't mean JSR in assembler, your
> solution is neither elegant nor worth repeating. ;-)
There's nothing elegant about having to test a condition variable at each
level of a deeply nested logic structure to exit the block on an error
condition. I think that it is more elegant to 'goto error_exit;' instead.
Do I do that to shortcut out of a single block? No! And I'll go so far as
to scratch my wrist with my belt loops, but I'm not twisting my code to
scratch my ear on my shoelace.
> Yes, you should minimize your use of globals, but that doesn't mean don't
> use globals when they make sense.
Agreed. I DO use globals when it makes sense, I just think twice about it
and normally leave myself a comment like /* GLOBALS - I hate these things.
*/ as a reminder to keep them from getting out of hand later.
> But hey, what do I know?
> I believe that a little Mishigas never hurt anyone.
I won't argue.
Art S. Kagel
> <SNIP>
Michael Segel wrote:
>> BTW, if you have to use a GOTO and I don't mean JSR in assembler, your
>> solution is neither elegant nor worth repeating. ;-)
Technically, (Read as, I am just trying to stir up trouble ;-) ) JSR is
not a goto in assembler but a GOSUB because it pushes the address of
the next instruction after the JSR on the stack before it jumps so that
a RET can pop it off of the stack at the end of the routine to start
executing where the JSR had left off.
↪ replying to bozon
Marco Greco — — source: Usenet: comp.databases.informix
bozon wrote:
> Michael Segel wrote:
>
>>>BTW, if you have to use a GOTO and I don't mean JSR in assembler, your
>>>solution is neither elegant nor worth repeating. ;-)
>>
>
> Technically, (Read as, I am just trying to stir up trouble ;-) ) JSR is
> not a goto in assembler but a GOSUB because it pushes the address of
> the next instruction after the JSR on the stack before it jumps so that
> a RET can pop it off of the stack at the end of the routine to start
> executing where the JSR had left off.
>
Aha! but are you and Uncle Mikey talking about the same assembly language? ;-)
--
Ciao,
Marco
______________________________________________________________________________
Marco Greco /UK /IBM Standard disclaimers apply!
Structured Query Scripting Language http://www.4glworks.com/sqsl.htm
4glworks http://www.4glworks.com
Informix on Linux http://www.4glworks.com/ifmxlinux.htm
↪ replying to bozon
Madison Pruet — — source: Usenet: comp.databases.informix
"bozon" <curtis@crowson1.com> wrote in message
news:1138720786.210494.138470@g47g2000cwa.googlegroups.com...
> Michael Segel wrote:
> >> BTW, if you have to use a GOTO and I don't mean JSR in assembler, your
> >> solution is neither elegant nor worth repeating. ;-)
>
> Technically, (Read as, I am just trying to stir up trouble ;-) ) JSR is
> not a goto in assembler but a GOSUB because it pushes the address of
> the next instruction after the JSR on the stack before it jumps so that
> a RET can pop it off of the stack at the end of the routine to start
> executing where the JSR had left off.
>
Hummm --- sounds like a COBOL alter statement to me.... ;-)
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.