comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos" <david.c.hoos.sr@ada95.com>
To: <comp.lang.ada@ada.eu.org>
Subject: Re: adasockets and adatypes
Date: Tue, 4 Sep 2001 09:55:19 -0500
Date: 2001-09-04T09:55:19-05:00	[thread overview]
Message-ID: <mailman.999615244.13142.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: tgzo8bcfqj.fsf@mercury.rus.uni-stuttgart.de

----- Original Message -----
From: "Florian Weimer" <Florian.Weimer@RUS.Uni-Stuttgart.DE>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Tuesday, September 04, 2001 7:17 AM
Subject: Re: adasockets and adatypes


> "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> writes:
>
> >> Does anyone know a way of sending an adatype (especially a record of
string
> >> and enumerated types) down a socket so it can be received by another
ada
> >> program which recognises the type....
>
> > Make the record a tagged type, and use 'Output to send it
> > and 'Input to read it.
>
> This works only if the compiler and architecture are the same on both
> ends of the communication channel.


This is simply not so. If the record component types have user-defined
endianness-independent stream attributes, then the data will have the
same format on the network.  Further, if you have compilers that do not
produce identical External_Tags, then a representation clause on the
type will insure that the External_Tags are identical.

I am communicating between Intel and Sun machines every day, in this
way.

To be sure, if one does an incomplete job of defining the types, then
there are no guarantees of identical stream representaion -- but the
language
_does_ provide the means doing the job the original poster requested.

> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>




  reply	other threads:[~2001-09-04 14:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-04 10:53 adasockets and adatypes Tony Gair
2001-09-04 11:37 ` David C. Hoos, Sr.
2001-09-04 12:17   ` Florian Weimer
2001-09-04 14:55     ` David C. Hoos [this message]
2001-09-04 15:33       ` Ted Dennison
2001-09-04 15:53         ` David C. Hoos
2001-09-04 18:53           ` Ted Dennison
2001-09-04 20:44             ` David C. Hoos
2001-09-04 21:35               ` Ted Dennison
2001-09-04 15:58         ` Marin David Condic
2001-09-05  9:13   ` Tony Gair
2001-09-04 12:02 ` Marc A. Criley
2001-09-04 13:43 ` Marin David Condic
2001-09-04 22:12   ` Simon Wright
2001-09-06  7:04     ` Ole-Hjalmar Kristensen
2001-09-07 13:16       ` Peter Dulimov
2001-09-07 14:46         ` Ted Dennison
2001-09-08  5:51         ` Simon Wright
2001-09-06 14:16     ` Marin David Condic
replies disabled

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