Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site kitty.UUCP Path: utzoo!watmath!sunybcs!kitty!peter From: peter@kitty.UUCP (Peter DaSilva) Newsgroups: net.lang.c Subject: Re: Assignment in Conditionals Message-ID: <286@kitty.UUCP> Date: Fri, 9-Aug-85 13:00:05 EDT Article-I.D.: kitty.286 Posted: Fri Aug 9 13:00:05 1985 Date-Received: Sat, 10-Aug-85 02:47:03 EDT References: <509@brl-tgr.ARPA> Organization: Recognition Research Corp., Clarence, NY Lines: 29 > There is no reason why assignment should not return a value. LISP & APL > both do. An experienced programmer in either language can handle that. > In LISP, even conditionals & loops return values, & I see no reason why > they couldn't have been designed that way in C. In the language 'C' is rumored (:->) to have developed from, they do. In BCPL any block can return a value: FOO = $( ... RESULTIS$) (or is that )$???) You can also do this: foo(table 1,5,7,9) Which is the equivalent of int *tmp={1, 5, 7, 9} foo(tmp) I wish 'C' kept both of these. I can do without the weird TEST/IF/UNTIL/WHILE... control structures, though. Hell, even auto-initialise aggregates other than strings would be ok. I know. The language purists are going to shoot me. (hides behind copy of "BCPL, the language and it's compiler" (Richards & Whitby-Stevens, Cambridge University Press, 1980)