[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

arose

6/12/2006 6:53:00 PM

Would someone please explain the signifigance of = vs == in ruby?

2 Answers

Tim Hoolihan

6/12/2006 7:06:00 PM

0

= is the assign operator a=3 assigns 3 to a
== is a test a==3 returns true if a is equal to 3

The best place to look for information like this is in some of the
online documentation:

Expressions:
http://www.rubycentral...tut_expres...

The whole book can be found at:
http://www.rubycentral...

arose wrote:
> Would someone please explain the signifigance of = vs == in ruby?
>

Just Another Victim of the Ambient Morality

6/12/2006 8:52:00 PM

0


"arose" <arosel@ercot.com> wrote in message
news:1150138376.396258.273350@f6g2000cwb.googlegroups.com...
> Would someone please explain the signifigance of = vs == in ruby?

Well, one is an assignment operator and the other is an equality test
operator.
Perhaps you were trying to ask about the difference between == and ===.
That's a more subtle question and, if no one response before I do a bit of
research, I'll let you know...