Precedence of '|' and '^' differs from the C language

e$B86e(B e$BM*$H?=$7$^$9!#e(B

e$B1i;;;R!Ve(B|e$B!W$H!Ve(B^e$B!W$NM%@h=g0L$,e(BCe$B8@8le(B/C#/Javae$BEy$H0[$J$k$h$&$J$N$G$9$,!"$3e(B
e$B$l$O0U?^$5$l$?$b$N$J$N$G$7$g$&$+!#e(B

e$BNc$($P!Ve(B1 | 2 ^ 3e$B!W$H$$$&<0$O!"e(B

  • gcc 4.2.4 e$B$G$O!Ve(B^e$B!W$NJ}$,M%@h=g0L$,9b$$$?$a!Ve(B1 | (2 ^
    3)e$B!W$H2r<a$5$le(B
    1 e$B$KI>2A$5$l$^$9$,!"e(B
  • Ruby1.8/1.9 e$B$G$ON><T$NM%@h=g0L$,Ey$7$$$?$a!Ve(B(1 | 2) ^
    3e$B!W$H2r<a$5$le(B
    0 e$B$KI>2A$5$l$^$9!#e(B

python 2.5.2 e$B$G$Oe(B 1e$B!"e(Bperl 5.8.8 e$B$G$Oe(B 0

e$B$K$J$j$^$9$M!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:37732] precedence of ‘|’ and ‘^’ differs from
the C language”
on Thu, 8 Jan 2009 12:27:57 +0900, Yutaka HARA [email protected]
writes:

|e$B1i;;;R!Ve(B|e$B!W$H!Ve(B^e$B!W$NM%@h=g0L$,e(BCe$B8@8le(B/C#/Javae$BEy$H0[$J$k$h$&$J$N$G$9$,!"$3e(B
|e$B$l$O0U?^$5$l$?$b$N$J$N$G$7$g$&$+!#e(B

e$B$*$$m$2$J5-21$K$h$l$Pe(BPerle$B$K9g$o$;$?$h$&$K;W$$$^$9!#e(B