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,ae40b60d59bcdc4b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-10 11:00:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!newsfeeds.belnet.be!news.belnet.be!btnet-peer1!btnet-peer0!btnet!dispose.news.demon.net!demon!nntp.news.xara.net!xara.net!gxn.net!news5-gui.server.ntli.net!ntli.net!news2-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: Subject: Re: Ada Examples and Problems X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Tue, 10 Apr 2001 18:53:56 +0100 NNTP-Posting-Host: 213.104.124.40 X-Complaints-To: abuse@ntlworld.com X-Trace: news2-win.server.ntlworld.com 986925215 213.104.124.40 (Tue, 10 Apr 2001 18:53:35 BST) NNTP-Posting-Date: Tue, 10 Apr 2001 18:53:35 BST Organization: ntlworld News Service Xref: supernews.google.com comp.lang.ada:6719 Date: 2001-04-10T18:53:56+01:00 List-Id: Hi folks, I rewrote the part of the example that reads data from the file. It works now but not as i intended. The program was supposed to read in a) owners first b) dogs second X) then display the output as an example of non sequential Stream IO. This means the problem lies with the read_owners and the read_dogs routines. Each owner record is followed by a dog record which is followed by a owner record and so on. There are five of each, meaning ten records in total. I got the sizes of each record from the program dog_type: 56 bytes owner_type: 41 bytes starting at 1, i read the first owner. this means we're now at 42 after the first read. Add size of dog_type in stream elements, this is byte for GNAT. this means we're now at 56+42 = 98 add 1 we're now at 99 read next owner. That's the theory. The reality is different. The reads occur at 1 97 193 289 385 481 Which i don't understand. Does anyone have any ideas? Thanks, Chris Campbell p.s. I got the program to work by doing a read of owner then dog 5 times. I wanted to demonstrate non-sequential access and this is the opposite.