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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7345e706c651a1a3 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.aset.psu.edu!not-for-mail From: "Bob Spooner" Newsgroups: comp.lang.ada Subject: Re: pragma Pack does not work on GNAT 5.01a for Redhat Linux. Date: Thu, 21 Jun 2007 10:50:55 -0400 Organization: Penn State University, Center for Academic Computing Message-ID: References: <1182259013.590515.118310@g4g2000hsf.googlegroups.com> NNTP-Posting-Host: nat2.arl.psu.edu X-Trace: f04n12.cac.psu.edu 1182437455 47640 128.118.40.77 (21 Jun 2007 14:50:55 GMT) X-Complaints-To: usenet@f04n12.cac.psu.edu NNTP-Posting-Date: Thu, 21 Jun 2007 14:50:55 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Xref: g2news1.google.com comp.lang.ada:16289 Date: 2007-06-21T10:50:55-04:00 List-Id: "Simon Wright" wrote in message news:m2hcp2e4fv.fsf@mac.com... > > There's always a price to pay, of course; the packing isn't dense, and > it can be quite a challenge to work out what bytes are actually being > sent (eg, if you find yourself having to talk to C after all). Yes, XDR takes care of things like endianness, etc. that otherwise get in the way, but as you point out, there's always a price to be paid for generality. In some cases it looks like it even will take care of differing floating point representations, although I wonder about out of range problems when converting. Isn't there an XDR library for C? I know that there is one for Fortran. I would think that as long as you have an XDR library for the language with which you need to communicate, you wouldn't have to decode the bytes yourself; or have I misunderstood what you are saying? Bob