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,2e66fe8b30e3ee2c X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: S'Write and How To Count Bytes Date: 2000/10/07 Message-ID: <39DF3347.38C82563@acm.org>#1/1 X-Deja-AN: 678657812 Content-Transfer-Encoding: 7bit References: <39D6891A.7DC448B6@acm.org><39D88ACE.92DF8897@acm.org> <8raa11$nmg$1@nnrp1.deja.com> <3A061E9A.B8F76112@telepath.com> X-Accept-Language: en X-Server-Date: 7 Oct 2000 14:28:45 GMT Content-Type: text/plain; charset=us-ascii Organization: Quadrus Corporation Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-10-07T14:28:45+00:00 List-Id: Ted Dennison wrote: > OK. I went and checked out the nifty new ARM in PDF form (html doesn't have > page numbers, presumably due to the formatting limitations of html). Here's > what it says: > > {8652/0040} For every subtype S of a language-defined nonlimited > specific type T, the output generated by S'Output or S'Write shall > be readable by S'Input or S'Read, respectively. This rule applies > across partitions if the implementation conforms to the > Distributed Systems Annex. > 36.1/1 > > Now just reading this cold, I would have figured that "language-defined > type" meant types defined by the language itself (eg: Integer), rather than > defined in a package (eg: System.Address or > Ada.Strings.Unbounded.Unbounded_String). Thus this passage really wouldn't > have anything to say about the workability of Unbounded_String'Write. > That's not the way I would read it if I were the Judge in Language Court. (Idea for a new T.V. series? Move over Judge Judy!) If I were the Judge, my legislating from the bench would go like this: "You guys wrote this ARM. The ARM defines the Ada language. The packages in the annexes are thus part of the Ada Language. Unbounded_String is a non-limited type in a language defined package (same as standard). Hence 36.1/1 implies that when 'Output is called, you can't just dump 32 bits of pointer into the stream - you've got to implement a 'Output that will write the contents of the Unbounded_String into the stream such that on 'Input you get back the string. Your unfunded mandate is to now go off and change your compilers." But of course, one must now ask what the implications are for 'Read and 'Write? Would they have to output the contents of the Unbounded_String? (Granted, you're on your own with respect to the length, but would it be required to treat the string properly?) MDC -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Giving money and power to Government is like giving whiskey and car keys to teenage boys." -- P. J. O'Rourke ======================================================================