[ruby-talk:02440] Re: Arrays and ranges

From: h.fulton@...
Date: 2000-04-10 23:33:12 UTC
List: ruby-talk #2440
> Actually, it doesn't ;-) You've got an assignment in the condition to
> the if statement, so the value will we true regardless of the
> relationship between c and d (unless d is nil or false).

Ouch! And me an oldtime C programmer... <hangs head in
shame>

> 
> (snip informative discussion)
> 

That makes sense, and it is all well and good...

I was going to say "but" here... but unfortunately I 
went back to my script and found that cases 3 and 6
are actually printing out the same thing after all.

Obviously a hardware problem, i.e., a short circuit
between the programmer's ears.  :)

Thanks,
Hal

In This Thread

Prev Next