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,22b2c05a8088bbb2 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Leading zeros with Int_IO.Put()? Or another package? Date: 1996/11/09 Message-ID: #1/1 X-Deja-AN: 195511499 references: <3281088B.24F@watson.ibm.com> <32834C9C.6D6A@watson.ibm.com> organization: New York University newsgroups: comp.lang.ada Date: 1996-11-09T00:00:00+00:00 List-Id: Norman Cohen says "Keith Thompson informed me in private correspondence that, like the standard 'Image attribute, the GNAT-only 'Img attribute puts in that annoying leading space, and upon trying it I find he's right. That's the risk of relying on vague recollections of descriptions of 'Img by GNAT team members rather than testing its behavior. (The ideal approach, of course, is to consult the documentation, but no version of gnatinfo.txt that I have mentions 'Img.)" Norman, you are missing a critical piece of documentation that is included in all GNAT releases, and which has often been mentioned on CLA, namely the features file. This describes the language features implemented, and in particular has full documentation on all GNAT defined attributes and pragmas (there are quite a lot of them, you should definitely look at this file). Here is the excerpt on 'Img Img The 'Img function is defined for any prefix, P, that denotes an object of scalar type T. P'Img is equivalent to T'Image (P). This is convenient for debugging. For example: Put_Line ("X = " & X'Img); has the same meaning as the more verbose: Put_Line ("X = " & Temperature_Type'Image (X)); where Temperature_Type is the subtype of the object X. I think you will find reading this file better than relying on vague recollections :-)