0
<=> разве шесть методов сравнения?
<=> в этом операторе, как написано, шесть методов сравнения, я насчитал только пять какой шестой?
11 ответов
+ 1
English?
+ 1
<|>|=|>=|<=
+ 1
<=> (spaceship) it's a Ruby operator
a <=> b:
If a < b then return -1
If a == b then return 0
If a > b then return 1
If a and b are not comparable return nil
0
I tried translating this in Google Translate and got the following:
-----------------------
<=> Is it six methods of comparison?
<=> In this statement, as written, six methods of comparison, I counted only five of which is the sixth?
-----------------------
Either Google Translate didn't translate this well, or the question being asked simply doesn't make sense.
0
yes! Is true
0
why six?
0
where is "six"
0
Doh... I didn't realize the <=> had an actual meaning. Yeah... it makes sense now. I just thought these characters were used as some sort of bullet.
Thanks for clarifying Vagif!
Would "==" count if you could repeat "="?
In some languages, "<>" is similar to "not" or "!=". Could this apply?
0
I don't know. This symbols are not in mathematics.
and they symbols have only comparison
0
show all six Operation
0
"<>" and "==" are missing from the 5 you already listed.