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,7876e4356325725b X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: Re: Ada.Streams examples Date: 1999/03/10 Message-ID: <36e6cd2c.3377267@news.pacbell.net>#1/1 X-Deja-AN: 453504308 References: <36e61db4.50430543@news.pacbell.net> <7c64kl$r8s$1@nnrp1.dejanews.com> X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.pbi.net 921095565 206.170.24.39 (Wed, 10 Mar 1999 11:52:45 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Wed, 10 Mar 1999 11:52:45 PDT Newsgroups: comp.lang.ada Date: 1999-03-10T00:00:00+00:00 List-Id: I'll take a look at Cohen (my son took my copy away to college). Barnes example is pretty minimal. I never would have figured this stuff out just from the RM. In addition to my questions, I'd like a good place to send others. I want to do an S'Read routine for a large array. I really don't want to iteratively call Element'Read for each element. Is there an alternative to the usual Unchecked_Conversion, overlaying, etc to get the data into my array? If the array were in a Sequential_IO file I could just do a single Read and the correct number of bytes would be copied to the array - like an implicit Unchecked_Conversion. What exactly is the use of S'Class'Read? If I don't define my own, the default dispatches to appropriate S'Read routines - mine or the default ones. If I do define my own S'Class'Read does that let me do other than dispatching if I want (like other procedures that take a classwide parameter)? Does RM 13.13.2(38) mean that my S'Class'Read will not be called for objects whose class is Son_Of_S? ie, does S'Class only apply "horizontally" to a single generation? The RM implies that an object's stream representation should be similar to its in-memory representation (a generalization from 13.13.2(17)). If I have an object which has a standard external representation (a Windows bmp bitmap, for instance) but a slightly different Ada representation in my program (discriminants, say), is it better to convert the object on Write to the "standard" external form, or to write it out as an Ada object as close as possible to its internal, Ada, memory form? This is not addressed in AQS - anybody have any experience with these choices?