comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: Distributed system portability
Date: Tue, 31 Jul 2001 17:36:22 GMT
Date: 2001-07-31T17:36:22+00:00	[thread overview]
Message-ID: <q0C97.12800$ar1.40675@www.newsranger.com> (raw)
In-Reply-To: Rbl97.14918$Kd7.9265254@news1.rdc1.sfba.home.com

In article <Rbl97.14918$Kd7.9265254@news1.rdc1.sfba.home.com>, tmoran@acm.org
says...
>>I'd say its a bit worse than that.  You really shouldn't try to access
>>them from code that wasn't compiled with the same Ada compiler (unless you
>>are *real* careful).  Even the same compiler on different platforms could
>>give different results.
>  That's true unless only if (you use default 'read etc) or (the size
>of Stream_Element is different).  The former is easily made false and
>the latter is rather unlikely to be true, and certainly should not
>come as a surprise if you are working with such differing machines.

That's what I meant by "*real* careful". To make sure they match in a specific
case, you can just try things out and reimplement yourself whatever doesn't work
right because of compiler/target differences. For example, you can implement
your own 'Read, 'Write, 'Input, 'Output, and the streams themselves if need be.
You can check for Ada.Streams.Stream_Element'size and account for that. However,
to make things truly *portable*, so that no such iterative checking is involved,
you have to do *all* this (including implementing all the stream attributes for
*all* types that will ever be used with the stream, excepting perhaps some
composite types). With that much work involved, the streams aren't really
providing you much except the supposedly nice syntax.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



  reply	other threads:[~2001-07-31 17:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-29 17:18 Distributed system portability Darren New
2001-07-30  8:00 ` Pascal Obry
2001-07-31  7:23   ` Frank
2001-07-31 16:35     ` Pascal Obry
2001-07-30 11:22 ` Thierry Lelegard
2001-07-30 13:05   ` Larry Kilgallen
2001-07-30 16:12     ` Thierry Lelegard
2001-07-30 21:39       ` Ted Dennison
2001-07-30 22:28         ` tmoran
2001-07-31 17:36           ` Ted Dennison [this message]
2001-07-31 18:15             ` tmoran
2001-07-31 18:55               ` Marin David Condic
2001-07-31 20:26               ` Ted Dennison
2001-07-31  7:44         ` Ole-Hjalmar Kristensen
2001-07-30 15:57 ` Marin David Condic
2001-07-30 17:17   ` Darren New
replies disabled

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