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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ac2397ce800de518 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-04 07:54:56 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: adasockets and adatypes Date: Tue, 4 Sep 2001 09:55:19 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <20010904115244.24236db3.tonygair@blueyonder.co.uk> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 999615295 90544 137.194.161.2 (4 Sep 2001 14:54:55 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 4 Sep 2001 14:54:55 +0000 (UTC) To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:12700 Date: 2001-09-04T09:55:19-05:00 ----- Original Message ----- From: "Florian Weimer" Newsgroups: comp.lang.ada To: Sent: Tuesday, September 04, 2001 7:17 AM Subject: Re: adasockets and adatypes > "David C. Hoos, Sr." 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 >