comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@acm.org>
Subject: Re: Advice on low level file handling.
Date: Fri, 07 Apr 2006 06:48:45 -0400
Date: 2006-04-07T06:48:45-04:00	[thread overview]
Message-ID: <uk6a1acfm.fsf@acm.org> (raw)
In-Reply-To: Xns979D55134B90Cpchapinsovernet@198.186.192.137

"Peter C. Chapin" <pchapin@sover.net> 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



      parent reply	other threads:[~2006-04-07 10:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02  2:47 Advice on low level file handling Peter C. Chapin
2006-04-02 10:55 ` Georg Bauhaus
2006-04-04  1:31 ` Randy Brukardt
2006-04-05 10:41   ` Peter C. Chapin
2006-04-06  7:43     ` Michael Paus
2006-04-06 12:21       ` Peter C. Chapin
2006-04-06 12:46         ` Dmitry A. Kazakov
2006-04-06 14:13         ` Bob Spooner
2006-04-07 10:48         ` Stephen Leake [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox