[ruby-list:357] Re: modify syntax(Re: operator)
From:
matz@... (Yukihiro Matsumoto)
Date:
1996-07-29 09:44:57 UTC
List:
ruby-list #357
まつもと ゆきひろです.
In message "[ruby-list:356] Re: modify syntax(Re: operator)"
on 96/07/29, Yasunari Momoi <conan@Armonicos.co.jp> writes:
|
|ももいです
|あれ? perl の not は結合が緩いとかありませんでしたっけ? (^^;)
|あ,and とかと 混同してるかも...
そうですよ.rubyもそうです.
|not a < b は not (a < b)
|!a < b は (!a) < b
|
|で合ってます?
あってます.perlもrubyも両方ともそうです.
ruby 0.99での優先順位は
not
and or
他の演算子たち
||
&&
他の演算子たち
!
だったわけです.これを今回
and or
not
他の演算子たち
||
&&
他の演算子たち
!
こうしたわけですね.
まつもと ゆきひろ /:|)
p.s
ちなみにperl5では
or xor
and
not
他の演算子たち
||
&&
他の演算子たち
!
です.