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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,75c440b4b7ed5f91 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.germany.com!storethat.news.telefonica.de!telefonica.de!news-fra1.dfn.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Real Time IO routines Date: Sat, 27 Oct 2007 22:51:19 +0100 Organization: Pushface Message-ID: References: <1193410739.367181.96050@50g2000hsm.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1193521884 24340 62.49.19.209 (27 Oct 2007 21:51:24 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 27 Oct 2007 21:51:24 +0000 (UTC) Cancel-Lock: sha1:F026OQZ3wcUnNJGAVXfAJ2u0H0U= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news2.google.com comp.lang.ada:2610 Date: 2007-10-27T22:51:19+01:00 List-Id: anon@anon.org (anon) writes: > Ada Purist never and I mean NEVER uses IMAGE attribute, in the body of > a program. They create a package or sub-package that performs the IO > functions with the use of the IMAGE attribute. > > IMAGE attribute is the last thing a programmer should use. to print a value. > It is normally use for DEBUGGING ONLY! A programmer should always create > a routine or better yet a package that uses an algorithm to prints the value > without the use of attributes. > > Mostly programs that are created by newbees use IMAGE attribute. I must be a newbie (NB spelling!) then. Where on earth do you get this viewpoint from? Please say why it is better to instantiate enumeration IO for Boolean rather than to use Boolean'Image? I suppose you would ban people from using Integer_IO, too. Good grief. > And as for my code! It answer the person question without adding extra > code that might confuse him. Plus, the "Ada.Real_Time" package uses: > > type Time is new Duration; > > which is in private section. So I know what to convert the value to. This is true so long as you and the person to whom you are giving advice are both using *this version of* *GNAT*. Whatever makes you suppose that the code you see in that private part will be the same for any other compiler? or for any other version of GNAT? or for GNAT for a different platform?