comp.lang.ada
 help / color / mirror / Atom feed
From: "Samuel T. Harris" <sam_harris@hso.link.com>
Subject: Re: Big-endian vs little-endian
Date: 1999/02/06
Date: 1999-02-06T00:00:00+00:00	[thread overview]
Message-ID: <36BD02DB.737849EE@hso.link.com> (raw)
In-Reply-To: 36B89411.7A6CFA14@lmco.com

Mark A Biggar wrote:
> 
> Nick Roberts wrote:
> 
> > (b) use Text_IO instead of Sequential_IO, and input and output the data in
> > the form of text.
> >
> > The advantage of (b) is that text is the most universal data format: non-Ada
> > programs will (almost always) be able to use the data (if that's what you
> > might ever require). The disadvantage is that the text uses up more storage
> > than its equivalent binary form. How much data do you have?
> 
> umm..  How many times have you actually coded this up both ways and compared.
> Almost every time I have tried this the text version of the data was smaller
> then the binary version, especially if you have variable sized data.  The
> only cases where the text was bigger envolved data that consisted of large
> amounts of high percession floats and even then the text was only about twice
> as big.  Even then, usually the advantages of portablility and human readablity
> of the text format outweigh the small space savings of binary data formats.
> 
> --
> Mark Biggar
> mark.a.biggar@lmco.com

As Technical Lead on a Air Force major command and control system,
our initial implementation used textual representations for all
the messaging between the distributed workstations and the central
server. This got us a working product much faster than dealing
with binary representations since the workstation and the central
server hardware were so contrary to each other. This also provided
easy network debugging with a simple sniffer/snopper (which was
also a security concern). Since then, I have always advocated
producing width, image, and value functions for all important
data types. In fact, I have generics which produce these functions
for arrays (trivial) and records (almost trivial) so the overhead
for developing these functions is insignificant. An they do come
in handy when a little text_io based debugging instrumentation
is needed. A simple put_line(image(whatever)); is always available.


-- 
Samuel T. Harris, Principal Engineer
Raytheon, Scientific and Technical Systems
"If you can make it, We can fake it!"




  reply	other threads:[~1999-02-06  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-29  0:00 Big-endian vs little-endian Mike Werner
1999-02-02  0:00 ` Nick Roberts
1999-02-03  0:00   ` Mark A Biggar
1999-02-06  0:00     ` Samuel T. Harris [this message]
1999-02-08  0:00       ` dennison
1999-02-08  0:00         ` Samuel T. Harris
1999-02-04  0:00   ` Richard D Riehle
1999-02-06  0:00   ` Mike Werner
1999-02-07  0:00     ` Matthew Heaney
1999-02-09  0:00     ` Stephen Leake
1999-02-10  0:00     ` Mike Werner
replies disabled

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