From: Kalman Noel Date: 2006-10-13T01:15:10+09:00 Subject: Re: IO.readint ? Tim Pease: > On 10/12/06, Rolando Abarca 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