Re: Real Time IO routines -- answering Simon Wright part 1
- From: Georg Bauhaus <rm.tsoh+bauhaus@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 Oct 2007 22:24:20 +0100
On Mon, 2007-10-29 at 19:28 +0000, anon wrote:
-- Basically, what's wrong with the IMAGE attribute?
--
-- Using IMAGE Attribute. Output formatted and style set by vendor
-- and the output format is not specified in Ada RM.
[examples of formatted I/O]
True, programming of formatted I/O of values in general
requires this approach. Text_IO.Editing is also quite
nice (though it is not available with every compiler...).
But, IO packages help with _formatted_ output of
non-String values. _Formatted_ output of simple String values
will, by comparison, require formatting efforts, too!
Same requirements, same approach. I can think of many good
reasons to just write unformatted string values to
Current_Output. (Which is 'Pseudo_Image for Strings ;-) [1]
For example, tabulation may require narrowing to columns,
paragraphs might have to be shaped, words truncated etc..
The circumstances are similar to those requiring numbers
with Aft, say.
So using 'Image or not seems a use case issue to me.
Seen from this point of view, the language, or some
notion of purity, cannot decide what the use case is.
Using IO packages can,
in my view, also be over the top when programmers apply their
stylistic preferences to external representations of output,
possibly, and unintentionally, hiding valuable information
that would in fact be produced by 'Image, if used with someone
else's Ada system.
[1] I guess this sounds silly, but I don't see numbers to be
special for the moment: For the reader, a word is an approximation
of a value, too.
.
- Follow-Ups:
- Re: Real Time IO routines -- answering Simon Wright part 1
- From: Dmitry A. Kazakov
- Re: Real Time IO routines -- answering Simon Wright part 1
- From: Georg Bauhaus
- Re: Real Time IO routines -- answering Simon Wright part 1
- 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
- Re: Real Time IO routines
- From: Simon Wright
- Re: Real Time IO routines -- answering Simon Wright part 1
- From: anon
- Real Time IO routines
- Prev by Date: Re: Real Time IO routines -- answering Simon Wright part 1
- Next by Date: Re: Real Time IO routines -- answering Simon Wright part 1
- Previous by thread: Re: Real Time IO routines -- answering Simon Wright part 1
- Next by thread: Re: Real Time IO routines -- answering Simon Wright part 1
- Index(es):
Relevant Pages
|