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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e61c8636ef35379d X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Ada Streams usage (was Escape Sequences in Strings) Date: 2000/11/19 Message-ID: <8v9lip$2dr$1@nnrp1.deja.com>#1/1 X-Deja-AN: 695547792 References: <3A17B0E2@MailAndNews.com> <3A129A89.1B69E2FE@acm.org> <3A13D59E.63A6F92@earthlink.net> <3A168546.89CA38F7@acm.org> <3A177878.AD747325@telepath.com> <3A182633.BDE82EA9@acm.org> X-Http-Proxy: 1.0 x59.deja.com:80 (Squid/1.1.22) for client 205.232.38.240 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sun Nov 19 22:52:10 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-11-19T00:00:00+00:00 List-Id: In article <3A182633.BDE82EA9@acm.org>, Marin David Condic wrote: > Ted Dennison wrote: > And *then* you start getting into the Deviled-Details. For > most of your primitive and compound types, you may be all > right to accept whatever the compiler does for 'Read and > 'Write - except that you get no guarantees of representation - > which can be a *real bitch!* if you have to pass stuff down a > wire to some unknown listener who is expecting > things to occupy precise positions within the stream. Well I find that a little pessimistic. The representation of primitive items should be governed by the IA in the RM 17 If a stream element is the same size as a storage element, then the normal in-memory representation should be used by Read and Write for scalar objects. Otherwise, Read and Write should use the smallest number of stream elements needed to represent all values in the base range of the scalar type. Note that in all implementations in normal use the predicate at the start of this paragraph is true. There is a bit of a puzzle about base types, but that is compeltely resolved by a recent AI (GNAT incidentally is already conforming to the recommendations of this AI, and always has). As for compound types, the RM requires that these be output as a sequence of stream elements for the primitive components, recursively, so this is 100% well defined. Sent via Deja.com http://www.deja.com/ Before you buy.