Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!ima!haddock!karl From: karl@haddock Newsgroups: net.lang.c Subject: Re: C-STYLE (goto?) Message-ID: <86900052@haddock> Date: Wed, 10-Sep-86 17:33:00 EDT Article-I.D.: haddock.86900052 Posted: Wed Sep 10 17:33:00 1986 Date-Received: Sun, 14-Sep-86 20:14:15 EDT References: <3253@brl-smok> Lines: 21 Nf-ID: #R:brl-smok:-325300:haddock:86900052:000:1042 Nf-From: haddock!karl Sep 10 17:33:00 1986 killer!toma (Tom Armistead) writes: >In article <3253@brl-smoke.ARPA>, jeff@isi-vaxa.ARPA writes: >>[code deleted] >>Now, I know a lot of people detest this because of the use of goto's, but >>this seems the nicest way to perform this function. > >There is always the use of setjmp and longjmp ...: [code deleted] >This will accomplish the same thing and possibly not affend the goto haters, Mother of swapper! A longjmp is *worse* than a goto. It's just a goto that doesn't respect function boundaries! Anyone who disapproves of goto but considers longjmp acceptable is objecting to the keyword rather than the concept ("I know goto is bad because my teacher said so"). (I'm not flaming Tom; his posting did not imply approval.) Lest you misunderstand me -- I am not a "goto hater". There are three valid uses of goto, one of which is error handling. Jeff, your program is a good example of proper goto usage. Leave it that way, but learn why it's right. Karl W. Z. Heuer (ima!haddock!karl; karl@haddock.isc.com), The Walking Lint