Re: Easy question about Character manipulation
- From: "Jeffrey R. Carter" <jrcarter@xxxxxxx>
- Date: Wed, 31 Jan 2007 18:14:48 GMT
Robert A Duff wrote:
I agree that it should probably be constant, but why not give it a type,
as in:
Size : constant Integer := 10;
I think named numbers are a kludge, and should usually be avoided.
I think they should be used whenever possible.
emptySpaces : array (1..size) of Character := "0123456789";
textLine : array (1..size * 3) of Character;
If Size is a named number, the index type of these arrays defaults to
Integer -- another language kludge.
Right. All such ranges should be a discrete subtype, either by name or by being the part to the right of "is" in a subtype declaration: Integer range X .. Y;
And there should be no anonymous types.
--
Jeff Carter
"Alms for an ex-leper!"
Monty Python's Life of Brian
75
.
- References:
- Easy question about Character manipulation
- From: mark
- Re: Easy question about Character manipulation
- From: Martin Krischik
- Re: Easy question about Character manipulation
- From: Jeffrey R. Carter
- Re: Easy question about Character manipulation
- From: Robert A Duff
- Easy question about Character manipulation
- Prev by Date: Re: Easy question about Character manipulation
- Next by Date: Re: Reading Float Data from a binary file into ada
- Previous by thread: Re: Easy question about Character manipulation
- Next by thread: Problems with gcov
- Index(es):