Ruby coding guideline

[email protected]@%$G$9!#e(B

[ruby-dev:34024] e$B$r$^$H$aD>$7$F?7$7$$%9%l%C%I$K$7$F$_$^$9!#e(B

e$BG==q$-$H$7$F$O!"$=$l$J$j$K%l%,%7!<$r9MN8$7$J$1$l$P$J$i$J$$e(B Ruby
e$B$K$*$$$F!“e(B
e$B$I$NDxEY$^$G$O9MN8$7!”[email protected]$j<N$F$F$$$$$N$+$K$D$$$F!"e(B
e$B$^$H$^$C$?J8=q$,$J$$$N$G?7$?$K%Q%C%A$rAw$m$&$H;W$C$??M$,J,[email protected]$m$&!&!&!&!“e(B
e$B$H$$$&$+$o$?$7$,$o$+$i$J$$$N$G65$($F$/[email protected]$5$$!”$H$$$&$b$N$G$9!#e(B

  • ANSI C e$B%W%m%H%?%$%W$rMQ$$$ke(B

  • char e$B$Oe(B 8bit e$B$+$De(B CHAR_BIT e$B$Oe(B 8

  • char e$B$Ne(B signed e$BA0Ds$OIT2De(B

  • short e$B$Oe(B 16bit e$B0J>e$Ne(B 2 e$B$NN_>he(B (16bit
    e$BA0DsIT2De(B)

  • int e$B$Oe(B 32bit e$B0J>e$Ne(B 2 e$B$NN_>he(B (32bit e$BA0DsIT2De(B)

  • long e$B$Oe(B 32bit e$B0J>e$Ne(B 2 e$B$NN_>he(B (32bit e$BA0DsIT2De(B)

  • pointer e$B$Oe(B 32bit e$B0J>e$Ne(B 2 e$B$NN_>he(B (32bit
    e$BA0DsIT2De(B)

  • int == long e$BA0DsIT2De(B (LP64e$BEye(B (e$BB?$/$Ne(B UNIX e$B7Oe(B))

  • long == pointer e$BA0DsIT2De(B (LLP64e$BEye(B (Win64))

  • long long e$B$NB8:_A0DsIT2De(B

  • e$BB8:$9$k$J$i$Pe(B long long e$B$Oe(B 64bit e$B0J>e$Ne(B 2
    e$B$NN
    >he(B (64bit e$BA0DsIT2De(B)

  • long long e$B$+e(B __int64 e$B$,B8:_$9$k>l9g$Oe(B LONG_LONG
    e$B$,Dj5A$5$l$ke(B

  • uint32_t e$B$OB8:$9$k$,!"$=$l0J30$OB8:$7$J$$e(B

  • C99 e$BA0DsIT2De(B

  • e$B%j%H%k%(%s%G%#%"%sA0DsIT2De(B (WORDS_BIGENDIAN e$B$GH=Dj2DG=e(B)

  • int [email protected]?tA4HL$KMQ$$$ke(B

  • long e$B$O%]%$%s%?$H1i;;$r9T$&@0?t$GMQ$$$ke(B

  • Fixnum e$B$Oe(B long e$B$N%S%C%HI}e(B-1

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

In message “[ruby-dev:34033] ruby coding guideline”
on Mar.13,2008 19:40:42, [email protected] wrote:
| * long == pointer e$BA0DsIT2De(B (LLP64e$BEye(B (Win64))
(e$BCfN,e(B)
| * long e$B$O%]%$%s%?$H1i;;$r9T$&@0?t$GMQ$$$ke(B

e$B$$$-$J$jL7=b$7$F$^$9$h$%!#e(B

[email protected]$H!“e(BSIGNED_VALUEe$B$r;H$C$F$/[email protected]$5$$!”$,Ez$($K$J$j$=$&e(B
e$B$G$9!#e(B

e$B$J$*!“e(B1.8e$B$G$Oe(Blong ==
pointere$B$rA0Ds$K$7$F$h$/$J$j$^$9!”$H$$$&$+!"e(B
e$B$=$&$G$J$$%W%i%C%H%U%)!<%`$O%5%]!<%H$7$F$$$^$;$s!#e(B

e$B$"$H!";d$,CN$C$F$$$F4{$KC/$+$,F’[email protected]$3$H$,$"$kLdBj$H$7$F$O!"e(B

  • e$BG[Ns$rIi$N%$%s%G%C%/%9$G%"%/%;%9$9$k$N$OIT2De(B(Ce$B5,3J$G$bL$Dje(B
    e$B5AF0:ne(B)

e$B$H$$$&$N$,$"$j$^$9$M!#e(B

e$B$=$l$G$O!#e(B

[email protected]@%$G$9!#e(B

U.Nakamura wrote:

[email protected]$H!“e(BSIGNED_VALUEe$B$r;H$C$F$/[email protected]$5$$!”$,Ez$($K$J$j$=$&e(B
e$B$G$9!#e(B

e$B$J$*!“e(B1.8e$B$G$Oe(Blong == pointere$B$rA0Ds$K$7$F$h$/$J$j$^$9!”$H$$$&$+!"e(B
e$B$=$&$G$J$$%W%i%C%H%U%)!<%`$O%5%]!<%H$7$F$$$^$;$s!#e(B

e$B$3$NItJ,$OLdBjDs5/$KKm$N$D$b$j$G$7$?!#e(B
e$B$D$^$j!"$o$?$7$NFI$_<h$C$?8B$j$G$O!"e(Blong
e$B$O%]%$%s%?$H$N1i;;MQ$H$7$Fe(B
e$BMQ$$$i$l$F$$$k$N$K!“e(BLLP64 e$B$,$”$k$?$a$KGKC>$7$F$$$k$H!#e(B

e$B$J$*!"<B:]$NNc$H$7$F!"e(BString e$B$de(B Array e$B$ND9$5$dE:$(;z!"e(B
e$B2C$($Fe(B Fixnum e$B$,e(B long e$B%Y!<%9$G$9$M!#e(B

[ruby-dev:29024] Fixnum on IL32LLP64 e$B$G$Oe(B long e$B$N%5%$%:$,e(B
e$B%]%$%s%?$h$j$b>.$5$$4D6-$G$NHa0%$,8l$i$l$F$$$^$9!#e(B
Fixnum e$B$N%Y!<%9$re(B SIGNED_VALUE [email protected]$jBX$($k0F$,$G$^$7$?$,!"e(B
e$B7k6I$3$3$G$O$$$/$D$+$NLdBj$K$h$C$F$H$s:C$7$F$$$^$9!#e(B

e$B6qBNE*$K$O!“e(B[ruby-dev:29054] e$B$K$”$j$^$9$,!"e(BSIGNED_VALUE
[email protected]$jBX$($?>l9g!"e(B

  • FIX2xxx e$B$NL>A0e(B
  • printf e$B$Ge(B Fixnum
    e$B$N?tCM$r=PNO$7$?$$>l9g!"=q<0;XDj;R$,%"!<%-%F%/%A%c0MB8e(B
  • e$BJQ99$,J#;(e(B
    e$B$"$?$j$,%M%C%/$K$J$C$?$h$&$G$9!#e(B

e$B$5$F!"$h$j3Z$JBe0F$H$7$F!"e(BSIGNED_VALUE e$B$NBe$o$j$Ke(B intptr_t
e$B$r;H$&$N$O$I$&$G$7$g$&!#e(B
e$BL>A0$Oe(B FIX2INTPTR e$B$J$je(B FIX2PTR e$B$G$$$$$G$7$g$&$7!"e(B
e$B=q<0;XDj;R$Oe(B %“PRIdPTR” e$B$,e(B C99 e$B$GI8=`2=$5$l$F$$$^$9!#e(B
(intmax_t e$B$KBP1~$9$ke(B %j e$B$+e(B %“PRIdMAX”
e$B$GBeBX$b$$$$$+$be(B)

e$B$^$?!"JQ99$Oe(B long e$B$re(B intptr_t e$B$KCV$-49$([email protected]$1$G$9!#e(B
e$B$J$K$h$j!"e(B1.8 e$B;~Be$G$Ne(B long == pointer e$B$N2>Dj$r!"e(B
e$B;EMM$+$i>[email protected]$jN)$De(B intptr_t == pointer
e$B$K0$7$FB39T$G$-$k$N$O3Z$G$7$g$&!#e(B
e$B$5$i$K!"e(BSIGNED_VALUE e$B$H0c$C$Fe(B C99
e$B$GI8=`2=$5$l$F$$$k7?$J$N$G!"e(B
e$B%(%G%#%?Ey$N;Y1g$bB?>/4|BT$G$-$k$+$b$7$l$^$;$s!#e(B

e$B$"$H!";d$,CN$C$F$$$F4{$KC/$+$,F’[email protected]$3$H$,$"$kLdBj$H$7$F$O!"e(B

  • e$BG[Ns$rIi$N%$%s%G%C%/%9$G%"%/%;%9$9$k$N$OIT2De(B(Ce$B5,3J$G$bL$Dje(B
    e$B5AF0:ne(B)

e$B$H$$$&$N$,$"$j$^$9$M!#e(B

e$B$J$k$[$I!"Ii$,Mm$`[email protected]$H!"Ii$NCM$N1&%7%U%H$H$+$b<BAu0MB8$G$7$?$M!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs