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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Wed, 23 Apr 2014 16:06:55 +0200 Organization: cbb software GmbH Message-ID: <1ehc8moozpxnj$.1twbrsmoobjry.dlg@40tude.net> References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: G+aXx1XI67D34t54ibhUPQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:19524 Date: 2014-04-23T16:06:55+02:00 List-Id: On Wed, 23 Apr 2014 05:55:00 -0700 (PDT), björn lundin wrote: > I'd like V'Img to be standard ada like T'Image(V); > As in the gnat implementation V means value, not an object? A value could be ambiguous. E.g. 123'Img OK, considering no place for the sign as in T'Image(V), the image of a modular and of an integer type will be same. But what about floating point types: 12.0001000020003'Img Depending on Float, Long_Float, IEEE_Float_32 the result will be different. > type T is some_discrete_type > V : T; > > Put_Line(V'Img); > > Also, I'd like to be able to define the string function > for a record type to be used for the 'image attribute. The only reason why anybody would use an attribute over a [primitive] function is that the attribute 'Image is predefined by the language/compiler. If record types ought to get 'Img, you should specify how to generate it for whatever record type. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de