Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!mcgill-vision!quiche!utility From: utility@quiche.cs.mcgill.ca (Ronald BODKIN) Newsgroups: comp.lang.c Subject: Re: if (e1) return e2; [else] s1; Message-ID: <2637@quiche.cs.mcgill.ca> Date: 26 Mar 90 22:29:52 GMT References: <887@dino.cs.iastate.edu> <1990Mar24.010629.12764@caen.engin.umich.edu> <10624@alice.UUCP> Reply-To: utility@quiche.cs.mcgill.ca (Ronald BODKIN) Organization: SOCS, McGill University, Montreal, Canada Lines: 21 In article <10624@alice.UUCP> ark@alice.UUCP (Andrew Koenig) writes: >Some people take the view that except at the end of a function, >`return' is just a funny way of spelling `goto.' Is this reallly a clearer and neater way of coding: int foo() { int ret; if (cond1) { /* do stuff */ ret=1; } else { /* do other stuff */ ret=2; } return ret; } This is slower and more cumbersome, IMHO. After all, while and until and for are also funny ways of spelling goto... Ron