From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103885,20ac8f08b884ba5 X-Google-Attributes: gid103885,public X-Google-Thread: 1094ba,10f7c56bf397ed71 X-Google-Attributes: gid1094ba,public X-Google-Thread: 111c93,20ac8f08b884ba5 X-Google-Attributes: gid111c93,public From: "James Giles" Subject: Re: Forcing 32-bit integers and math Date: 1998/10/15 Message-ID: <705c5g$pl@bgtnsc01.worldnet.att.net>#1/1 X-Deja-AN: 401420309 References: <36255A0B.4C40@wizard.com> <703ulq$68a@news3.newsguy.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Organization: AT&T WorldNet Services Newsgroups: comp.lang.fortran,comp.graphics.visualization,comp.os.linux.alpha Greg Lindahl wrote in message <703ulq$68a@news3.newsguy.com>... ... >Right. On Unix platforms, which is what this fellow is using, there is >a simple convention: a 4-byte delimiter giving the length of the >record in bytes. I've yet to meet an alternate Fortran compiler on a >Unix box which did anything different; the only incompatibility I've >seen springs from the desire to support 64 bits, and between >platforms, Cray's use of a word length instead of a byte length. I would be surprised if there were only a 4-byte record length on UNIX platforms. One main reason to have record marks is to be able to BACKSPACE the unit. This means that if you're positioned at the start of record N in the file, you need to know the length of record N-1 so that you can skip that distance backwards. All Fortran I/O libraries I've seen (and I've even written one) have a record mark which contains both the length of the next record and the length of the preceeding record. On Crays, this was represented as a 64-bit quantity: the first 32 were the length of the preceeding record and the second 32 were the length of the following record. If UNIX platforms typically use only 4 bytes for this, they must be limiting records to lengths of 64K(16 bit length counts). And since they use bytes as their unit of length, that's 64K bytes = 16K (32-bit) words. Is that what they do? -- J. Giles