Tim Pease: > On 10/12/06, Rolando Abarca <funkaster / gmail.com> wrote: >> int b; >> read(f, &b, sizeof(int)); > class IO > def geti( endian = :little ) > str = self.read( 4 ) > str = str.reverse if endian == :little > str.unpack( 'N' )[0] > end > end Yet you cannot be sure that sizeof(int) is 4. Kalman