Re: Real Time IO routines
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Mon, 29 Oct 2007 15:34:23 -0700
Adam Beneschan <adam@xxxxxxxxxx> writes:
On Oct 29, 9:40 am, Robert A Duff <bobd...@xxxxxxxxxxxxxxxxxxxx>[...]
wrote:
Adam Beneschan <a...@xxxxxxxxxx> writes:
... The semantics and result of 'Image are
well-defined by the language. If those semantics are acceptable for a
particular use, then there's nothing wrong with using 'Image (unless
there's an issue with using a secondary stack as Ludovic mentioned).
True. But it's pretty annoying that:
'Image of integers includes an unwanted leading space.
As for #1, I've often written my own function that declares a string S
whose value is 'Image and then returns S(S'First+1..S'Last) to get rid
of the leading space---this was before Trim functions became available
in Ada 95.
I hope you check that the value is non-negative before deleting the
first character.
[...]
I believe GNAT does have an 'Img attribute that can be applied to an
object (although I assume you still need 'Image for certain types of
expressions that are not valid attribute prefixes). I don't know
whether this was ever proposed as a language addition, and if so why
it was rejected.
GNAT's 'Img does the same leading-space thing that the standard 'Image
does.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- 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: Adam Beneschan
- Re: Real Time IO routines
- From: Robert A Duff
- Re: Real Time IO routines
- From: Adam Beneschan
- 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
- Previous by thread: Re: Real Time IO routines
- Next by thread: Re: Real Time IO routines
- Index(es):
Relevant Pages
|