Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!lll-lcc!lll-crg!topaz!uwvax!oarv rd!cmcl2!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: net.lang.c Subject: Re: Jumping into blocks Message-ID: <1324@mmintl.UUCP> Date: Mon, 28-Apr-86 18:40:15 EDT Article-I.D.: mmintl.1324 Posted: Mon Apr 28 18:40:15 1986 Date-Received: Fri, 2-May-86 23:46:31 EDT References: <1370@ism780c.UUCP> <360@hadron.UUCP> <275@copper.UUCP> <737@bentley.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT Lines: 18 In article <737@bentley.UUCP> kwh@bentley.UUCP writes: >So, assuming that goatooze are acceptable for error handling, but jumping >into a block is forbidden, what's the best way to write this? Use two >branches, and hide the common code at the bottom of main()? Yes. Exception handlers belong at the bottom of the routine. It isn't "hidden" there -- that's the first place I would look for it. I would describe it as being hidden in your code (for whichever case it is being jumped to). Duplicating the code is also acceptable. It depends mostly on a comparison of two considerations: (1) how likely are there to be more instances where the code is to be used in later versions of the routine, and (2) how likely is it that later versions will want a different error message for the two cases? Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Multimate International 52 Oakland Ave North E. Hartford, CT 06108