From: Katsuyuki Komatsu Date: 2000-05-25T22:29:20+09:00 Subject: [ruby-dev:9856] Re: IRIX 6.5 cc -64 support 小松です。 In the message of [ruby-dev:9787] Re: IRIX 6.5 cc -64 support on 2000/5/22 08:24:51 matz@netlab.co.jp (Yukihiro Matsumoto) wrote: |ああ、そうか。勘違いしてたみたいですね。 うまい具合に64-bitのLittle EndianマシンとBig Endianが そろってくれて楽しめます。 ||ところで、perldoc -f packを見てみましたが、64-bit用に ||'q'と'Q'があるんですね。 ||サポートした方がいいのかな? | |昔からあった方が良いかもとは思っていたのですが、どこでも使え |るわけでないものって要らないような気もして採用してなかったん |です。特にRubyにはBignumがあるのでそのカラミをどうしたものか |と。 packのデバッグして初めて知りましたが、's_'や'l_' (native integer) というのがあるんですね。 'l_'で64-bitを扱えるので、まったくできないのかと思っていた最初の 頃に比べると、'q'や'Q'はかなりpriorityが下がっています。 そうそう、native integerのtestも欲しいです。 diff -ru1p ruby-1.5.4.dist/sample/test.rb ruby-1.5.4/sample/test.rb --- ruby-1.5.4.dist/sample/test.rb Wed May 24 13:34:26 2000 +++ ruby-1.5.4/sample/test.rb Thu May 25 22:09:53 2000 @@ -1028,6 +1028,6 @@ check "pack" -$format = "c2x5CCxsdila6"; +$format = "c2x5CCxsdils_l_a6"; # Need the expression in here to force ary[5] to be numeric. This avoids # test2 failing because ary2 goes str->numeric->str and ary does not. -ary = [1,-100,127,128,32767,987.654321098 / 100.0,12345,123456,"abcdef"] +ary = [1,-100,127,128,32767,987.654321098 / 100.0,12345,123456,-32767,-123456,"abcdef"] $x = ary.pack($format) -- 小松克行 / Katsuyuki Komatsu