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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8a019ea882aac73c X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: GNAT's internal format for Discriminant Records? Date: 1998/06/21 Message-ID: #1/1 X-Deja-AN: 364717367 References: <6meah3$3b$1@cronkite.sp.trw.com> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 898441261 16205 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-06-21T00:00:00+00:00 List-Id: Rich said <> You can only assume that data is transferable between implementations if the layout is fully specified by rep clauses, and generally this may not be possible, e.g. for tagged types. Certainly the tag itself will NOT be transferrable in practice in any case. Variant records should be no problem, since you can specify the location of every field including the discriminants. It seems most strange for a compiler to NOT include the discriminants in values of the type (this is the normal implementation approach). But I think that the whole idea of trying to interchange data at this level is flawed for anything as complex as tagged types and variant records. It is usually better to use a higher level approach, e.g. use streams with your own stream read/write routines defined. If you are using GNAT on multiple platforms, you can use GLADE (our annex E Distributed Systems implementation), to implement heterogenous distributed applications using XDR for data interchange. Robert Dewar Ada Core Technologies