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-11 10:50:05 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!europa.netcrusader.net!194.176.220.130!newsfeed.icl.net!dispose.news.demon.net!demon!btnet-peer0!btnet!news5-gui.server.ntli.net!ntli.net!news6-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: Wed, 11 Apr 2001 18:43:57 +0100 NNTP-Posting-Host: 62.252.136.116 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 987011014 62.252.136.116 (Wed, 11 Apr 2001 18:43:34 BST) NNTP-Posting-Date: Wed, 11 Apr 2001 18:43:34 BST Organization: ntlworld News Service Xref: supernews.google.com comp.lang.ada:6776 Date: 2001-04-11T18:43:57+01:00 List-Id: I'm not impressed. I've spent 2 or 3 days on this and it's drove me nuts. 2 minutes after i read your post I got it working. The size of the record dog_type is 56 but the size of it's contents is 53. Just 3 bytes of padding and 3 bytes that drove me nuts. This is something i'm going to have to watch out for in future. I've got an idea about how to limit the chances of me running into this again. I'm going to put a function for every type i might write to a stream (that's not dynamic in size) that gives the size of it's contents. -- a function that returns the total size of all fields in type X; -- function size_of_fields(t : in X) return natural; Not the best option but certainly better than hardwiring it into the file/stream handling routines. Thanks to Ted and everyone else who's helped me with this. Regards, Chris