Re: [OFFTOPIC] CompSci class question

new topic     » goto parent     » topic index » view thread      » older message » newer message

In the absence of better exception-handling facilities, I used to use
setjmp/longjmp in C for that purpose *all the time*, in fact at my shop we
had a "structured" error-handling facility that was programmed using those
functions. So the argument could be made (in the absence of better
exception-handling), for the "non-local goto" of the setjmp/longjmp variety.
There are those who argue that it's hard to read / follow / understand code
using setjmp/longjmp. I found them no more "scary" or "obfuscating" than
(for example) recursion.

I am not arguing FOR goto. In general, I prefer to program without goto or
its "evil cousins", but there are cases where I find something like "exit"
preferable to the alternatives. And I appreciate built-in exception
handling. There are often cases where I want to do something in between
continuing to execute local code and terminating my program.

George

----Original Message Follows----
From: Kat <gertie at PELL.NET>

Granted, the goto in Eu should be restricted to the scope of the
procedure, function, or the main that it is used in.

Kat

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu