On Wed, Jun 14, 2006 at 09:30:23AM +1000, John Clarke wrote:
> On Wed, Jun 14, 2006 at 09:11:49 +1000, Matthew Palmer wrote:
> > > 
> > >     const int x = remainder > 2 ? 5 : 0;
> > 
> > That's not the same thing.
> 
> How so?

You're setting a value for x regardless of whether the conditional is true
or false, whereas the Ruby code does not modify the variable unless the
conditional is true.

- Matt

-- 
When I was a kid I used to pray every night for a new bicycle. Then I
realised that the Lord doesn't work that way so I stole one and asked Him to
forgive me.
                -- Emo Philips.
_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders

Reply via email to