Tugger the SLUGger!SLUG Mailing List Archives

[coders] Re: RubySIG Lesson Code


On Wed, Jun 14, 2006 at 08:51:12AM +1000, John Clarke wrote:
> On Wed, Jun 14, 2006 at 08:02:43 +1000, James Crisp wrote:
> > Erik de Castro Lopo wrote:
> > > 4/ Ocaml lets you set a value based on the result of an if statment.
> > >   
> > Ruby also lets you do this, as the 'if' statement is an expression. Eg, 
> 
> You can do the same in C/C++:
> 
>     const int x = remainder > 2 ? 5 : 0;

That's not the same thing.

- Matt

-- 
<Igloo> I remember going to my first tutorial in room 404. I was most upset
when I found it.