From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,20ac8f08b884ba5 X-Google-Attributes: gid111c93,public X-Google-Thread: 103885,20ac8f08b884ba5 X-Google-Attributes: gid103885,public X-Google-Thread: 1094ba,10f7c56bf397ed71 X-Google-Attributes: gid1094ba,public From: "James Giles" Subject: Re: Forcing 32-bit integers and math Date: 1998/10/18 Message-ID: <70dqod$47n@bgtnsc02.worldnet.att.net>#1/1 X-Deja-AN: 402608652 References: <36255A0B.4C40@wizard.com> <703ulq$68a@news3.newsguy.com> <705c5g$pl@bgtnsc01.worldnet.att.net> 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 Richard Maine wrote in message ... ... >P.S. I *HAVE* seen a non-unix system (Elxsi) that used only headers with no >trailer or other way to record the size of the preceding record. Backspace >even worked - wanna know how? It kept track of the current record number >and, if you wanted to backspace, it rewound the file and skipped N-2 records. Ouch. Well, in order to get to record N, it should have traversed the file sequentially. Why not keep track of the previous record's length instead of just the record number? Then a single backspace would be easy. Multiple backspaces would still require going back to the start. Actually, you could make a trade-off between memory overhead in the I/O implementation and the time required for backspacing by keeping the last N record lengths on a stack (throwing away the oldest one when you try to push more than N) and figuring what value of N is sufficient for the "average" number of consecutive backspaces. It cold be made to work I suppose. Not worth it though: better to have the backward link. -- J. Giles