Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!deimos.cis.ksu.edu!dino!hascall From: hascall@cs.iastate.edu (John Hascall) Newsgroups: comp.lang.c Subject: Re: if (e1) return e2; [else] s1; Message-ID: <896@dino.cs.iastate.edu> Date: 25 Mar 90 18:57:45 GMT References: <887@dino.cs.iastate.edu> <1990Mar24.010629.12764@caen.engin.umich.edu> <10624@alice.UUCP> Sender: usenet@dino.cs.iastate.edu Organization: Ministry of Silly Walks Lines: 44 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.' There's no accounting for taste, I guess... :-) Anyhow, I took a stroll through K&R1 and lo and behold (oh dear, say it isn't so!) I found `return's not at the end of a function: FUNCTION PAGE binary 54 index 67 push 75 pop 75 getop 78 alloc 97 strcmp 101 strcmp 102 readlines 107 numcmp 117 binary 125 getword 127 type 127 binary 129 lookup 135 install 136 (got tired of looking...you get the point) ----------------------------------------------------------------------- Also, I found a couple of interesting remarks on: return ( expr ) [page 68] ... Any expression can follow return: return(expression) [page 70] ... The value of the expression in return(expression) is always converted ... ----------------------------------------------------------------------- John Hascall hascall@atanasoff.cs.iastate.edu