From: Robert Feldt Date: 2003-05-29T19:45:24+09:00 Subject: Re: RCR: unpack/pack Bignum On Thu, 29 May 2003 nobu.nokada@softhome.net wrote: > > Sounds like a nice idea. however, for consistency we should also change > > 'A10' to 'A(10)'? Might not be adopted since it breaks old code? > > Now 'A10' means a 10 bytes string. Even if size specifier is > provided it should not be changed, however, 'A(10)' would be > legal and succeeding count also could be allowed; 'A(10)2' for > 2 strings each consist of 10 bytes. > Ok, so 'A10' and 'A(10)' means the same thing. Sounds good. So with this scheme [1].pack("N(5)") # => "\0\0\0\0\001" but what about [0x010203].pack("N(2)") ? Should it truncate? MSB or LSB? How can this be used when I have a Bignum that I don't know how large it will be? 'N(*)'? /Robert