From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ccc96dfdd6a003a7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-13 11:29:48 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub2.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Reading variable-length records from a file References: <9l93cp$bbf$1@slb7.atl.mindspring.net> X-Newsreader: Tom's custom newsreader Message-ID: Date: Mon, 13 Aug 2001 18:29:47 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 997727387 24.7.82.199 (Mon, 13 Aug 2001 11:29:47 PDT) NNTP-Posting-Date: Mon, 13 Aug 2001 11:29:47 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:11860 Date: 2001-08-13T18:29:47+00:00 List-Id: > Unfortunately, the files were ZIPped up and sent to me; Do you mean with pkzip? If so, I'd expect pkzip options to convert. > program to convert the files for me. I could have written a C program to > do this in the time it took for me to write the original post, > ... > the only suggestion on actually doing the conversion in Ada was to read > two characters, multiply the first by 256, add them together, and then > read that number of characters from the file. GROSS! There has to be a > better way! For those of us too dense to see the better way, could you please show (the important parts of) the C code you would use? Perhaps there's a clever trick that could also be used in Ada.