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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6eac62e4f2badf3a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-09 16:09:09 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Persistence of limited tagged types Date: 9 Apr 2003 16:09:09 -0700 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0304091509.150cc6d7@posting.google.com> References: NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1049929749 31003 127.0.0.1 (9 Apr 2003 23:09:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 9 Apr 2003 23:09:09 GMT Xref: archiver1.google.com comp.lang.ada:36037 Date: 2003-04-09T23:09:09+00:00 List-Id: Nick Roberts wrote in message news:... > > Speaking (all right writing) 'off the cuff' as it were, my attitude is that > limited types are (supposed to be) inherently not the kind of types which > are persistent (serialisable). > > I would expect your type (hierarchy) to be non-limited if it is > serialisable; possibly this is a slightly purist point of view. Is T'Output available if type T is limited? GNAT lets me declare an output operation: type T is limited null record; procedure Output (Stream : access Root_Stream_Type'Class; Item : in T); for T'Output use Output; but then it refuses to let me call it: O : T; begin T'Output (Stream, O); end; I get an error message that "limited type T has no stream attributes." However, if I define T'Write, then GNAT compiles T'Write (Stream, O); without complaint. What's up with that? Is the expectation that T'Output can't be used for a limited type? Why does GNAT allow me to define the T'Output stream attribute?