When is a statement an expression?

Jeremy Roussak jeremyr at cs.qmc.ac.uk
Sat Apr 29 18:25:24 AEST 1989


In article <4011 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>In article <1043 at itivax.iti.org>, scs at vax3.iti.org (Steve Simmons) writes:
>> 	a = if ( a == 1 )
>> 		12 ;
>> 	else
>> 		14 ;
>
>I modified a C compiler to do that once. It's very BCPL/Algol-ish. Rather
>neat, too. Pity it's not 'C'.
>-- 
>Peter da Silva, Xenix Support, Ferranti International Controls Corporation.
>
>Business: uunet.uu.net!ficc!peter, peter at ficc.uu.net, +1 713 274 5180.
>Personal: ...!texbell!sugar!peter, peter at sugar.hackercorp.com.


It may be very Algol-ish, but it's certainly not BCPL.  BCPL has
a==0 -> 10, 12
It doesn't use if in that way, unles you include the valof/resultis
clause.

Jeremy Roussak                    Just a part-time hacker



More information about the Comp.lang.c mailing list