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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!uwmcsd1!ig!agate!ucbvax!SEI.CMU.EDU!John.Goodenough From: John.Goodenough@SEI.CMU.EDU Newsgroups: comp.lang.ada Subject: IMAGE for non-graphic characters Message-ID: <8803141433.AA02147@cs.sei.cmu.edu> Date: 14 Mar 88 14:33:36 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: With respect to the recent question about the image of a nongraphic character, AI-00239 addresses this issue. This is a non-binding interpretation, meaning it is recommended, but not enforced, and may be the required position in a future version of the Standard. I quote from the summary of this commentary: If ENUM_IO is an instantiation of ENUMERATION_IO for a character type that contains a non-graphic character, e.g., package ENUM_IO is new ENUMERATION_IO (CHARACTER); then for each non-graphic character (such as ASCII.NUL), ENUM_IO.PUT should output the corresponding sequence of characters used in the type definition (e.g., PUT(ASCII.NUL) should output the string "NUL" if SET has the value UPPER_CASE and WIDTH is less than 4). Furthermore, ENUM_IO.GET should be able to read the sequence of characters output by ENUM_IO.PUT for a non-graphic character, returning in its ITEM parameter the corresponding enumeration value. Similarly, the image of a non-graphic character (i.e., the result returned for the attribute designator IMAGE) should be the sequence of characters used in the type definition of CHARACTER (e.g., CHARACTER'IMAGE(ASCII.NUL) = "NUL"), and 'VALUE should accept such a string as representing the corresponding enumeration value. An implementation conforms to the Standard in this respect if the result produced by 'IMAGE for a non-graphic character is accepted by 'VALUE, and if the result (if any) produced by PUT can be read by GET; GET is also allowed to raise DATA_ERROR when attempting to read any string produced by PUT for a non-graphic character. This interpretation is non-binding, i.e., implementers are encouraged to conform to it but are not required to do so by the validation tests. A future version of the Standard may incorporate this interpretation. John Goodenough Software Engineering Institute Goodenough@sei.cmu.edu