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-Thread: 103376,c1da643bcd91f37b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!atl-c08.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Advice on low level file handling. References: From: Stephen Leake Date: Fri, 07 Apr 2006 06:48:45 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:LkJeO1hIHwvyDFral301Lg+ejZs= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 5aeea44364397e73ae4a428607 Xref: g2news1.google.com comp.lang.ada:3744 Date: 2006-04-07T06:48:45-04:00 List-Id: "Peter C. Chapin" writes: > In other words: I probably need to treat the file as a blob of > unstructured, typeless data and impose structure on it at run time rather > than with compile time declarations. Yes, that is typically the case when reading files of data. > This seems somewhat contrary to the ideals of strong typing, but I'm > not sure I see a good alternative in a case like this. I suppose > this is why practical strongly typed languages have escapes from > their typing mechanisms. This problem must come up frequently when > writing programs that conform to externally defined binary > standards. Yes. For one fairly well structured solution, see http://www.toadmail.com/~ada_wizard/ada/sal.html , particularly the "network_order" packages (sal-network_order.ads, sal-*-network_order.*). -- -- Stephe