Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittatc!dcdwest!sdcsvax!sdcrdcf!hplabs!hpda!hpisoa2!hpitg!mmintl!franka@mmintl From: franka@mmintl Newsgroups: net.lang.c Subject: Re: Re: Jumping into blocks Message-ID: <1324@mmintl> Date: Tue, 29-Apr-86 03:40:00 EDT Article-I.D.: mmintl.1324 Posted: Tue Apr 29 03:40:00 1986 Date-Received: Tue, 13-May-86 01:14:38 EDT References: <737@bentley> 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