Re: Real Time IO routines
- From: Simon Wright <simon.j.wright@xxxxxxx>
- Date: Sat, 27 Oct 2007 22:51:19 +0100
anon@xxxxxxxx (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?
.
- Follow-Ups:
- Re: Real Time IO routines answering Simon Wright part 2
- From: anon
- Re: Real Time IO routines -- answering Simon Wright part 1
- From: anon
- Re: Real Time IO routines
- From: Ludovic Brenta
- Re: Real Time IO routines answering Simon Wright part 2
- References:
- Real Time IO routines
- From: andrew
- Re: Real Time IO routines
- From: anon
- Re: Real Time IO routines
- From: Dmitry A. Kazakov
- Re: Real Time IO routines
- From: anon
- Real Time IO routines
- Prev by Date: Re: Real Time IO routines
- Next by Date: Re: Real Time IO routines
- Previous by thread: Re: Real Time IO routines
- Next by thread: Re: Real Time IO routines
- Index(es):
Relevant Pages
|