* Re:A quickie problem with an array and a right hand bracket
@ 2001-06-11 15:33 ANH_VO
2001-06-12 3:16 ` DuckE
0 siblings, 1 reply; 2+ messages in thread
From: ANH_VO @ 2001-06-11 15:33 UTC (permalink / raw)
To: chris.danx, comp.lang.ada
It is clearly violated Ada syntax rules. '0'..'9' and 'a'..'f' mean character
range, not a single value. Character range does not match the array object
Basic_16. The correct syntax is shown below or similar.
basic_16 : constant array_16 :=
('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f');
Anh Vo
____________________Reply Separator____________________
Subject: A quickie problem with an array and a right hand bracket
Author: "chris.danx" <chris.danx@ntlworld.com>
Date: 6/11/01 6:08 PM
Hello everyone,
I'm trying to provide an array for quickie conversion between numbers and
character equivalents like this
type array_16 is array (natural range 0..15) of character;
basic_16 : constant array_16 := ('0'..'9'|'a'..'f');
The compiler corrected me on the use of a comma where the dda ("d divides a",
from math sorry, it's a bar or more symbol) but this doesn't help with
"unexpected parenthesis error" when it's compiled. What's the problem? It
looks correct to me but clearly i am missing something (very subtle) point.
In case i get the use text_io and tear off the start and end parts for
displaying in other bases argument. I do not want to use text_io in this manner
since i want to remove (as much as possible) dependance on the standard packages
(for now).
Thanks,
Chris Campbell
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Re:A quickie problem with an array and a right hand bracket
2001-06-11 15:33 Re:A quickie problem with an array and a right hand bracket ANH_VO
@ 2001-06-12 3:16 ` DuckE
0 siblings, 0 replies; 2+ messages in thread
From: DuckE @ 2001-06-12 3:16 UTC (permalink / raw)
Personally, I prefer
basic_16 : constant array_16 := "0123456789abcdef";
for this case.
SteveD
<ANH_VO@udlp.com> wrote in message
news:mailman.992281454.32344.comp.lang.ada@ada.eu.org...
> It is clearly violated Ada syntax rules. '0'..'9' and 'a'..'f' mean
character
> range, not a single value. Character range does not match the array object
> Basic_16. The correct syntax is shown below or similar.
>
> basic_16 : constant array_16 :=
> ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
> 'a', 'b', 'c', 'd', 'e', 'f');
>
> Anh Vo
>
> ____________________Reply Separator____________________
> Subject: A quickie problem with an array and a right hand bracket
> Author: "chris.danx" <chris.danx@ntlworld.com>
> Date: 6/11/01 6:08 PM
>
> Hello everyone,
>
> I'm trying to provide an array for quickie conversion between numbers and
> character equivalents like this
>
> type array_16 is array (natural range 0..15) of character;
>
> basic_16 : constant array_16 := ('0'..'9'|'a'..'f');
>
> The compiler corrected me on the use of a comma where the dda ("d divides
a",
> from math sorry, it's a bar or more symbol) but this doesn't help with
> "unexpected parenthesis error" when it's compiled. What's the problem?
It
> looks correct to me but clearly i am missing something (very subtle)
point.
>
> In case i get the use text_io and tear off the start and end parts for
> displaying in other bases argument. I do not want to use text_io in this
manner
> since i want to remove (as much as possible) dependance on the standard
packages
> (for now).
>
>
> Thanks,
> Chris Campbell
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-12 3:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-11 15:33 Re:A quickie problem with an array and a right hand bracket ANH_VO
2001-06-12 3:16 ` DuckE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox