From: ANH_VO@udlp.com
To: "chris.danx" <chris.danx@ntlworld.com>, comp.lang.ada@ada.eu.org
Subject: Re:A quickie problem with an array and a right hand bracket
Date: Mon, 11 Jun 2001 10:33:41 -0500
Date: 2001-06-11T10:33:41-05:00 [thread overview]
Message-ID: <mailman.992281454.32344.comp.lang.ada@ada.eu.org> (raw)
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
next reply other threads:[~2001-06-11 15:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-11 15:33 ANH_VO [this message]
2001-06-12 3:16 ` Re:A quickie problem with an array and a right hand bracket DuckE
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox