comp.lang.ada
 help / color / mirror / Atom feed
From: "DuckE" <nospam_steved94@home.com>
Subject: Re: Re:A quickie problem with an array and a right hand bracket
Date: Tue, 12 Jun 2001 03:16:47 GMT
Date: 2001-06-12T03:16:47+00:00	[thread overview]
Message-ID: <zQfV6.153248$p33.3219734@news1.sttls1.wa.home.com> (raw)
In-Reply-To: mailman.992281454.32344.comp.lang.ada@ada.eu.org

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
>
>





      reply	other threads:[~2001-06-12  3:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox