comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: A quickie problem with an array and a right hand bracket
Date: Mon, 11 Jun 2001 17:24:04 GMT
Date: 2001-06-11T17:24:04+00:00	[thread overview]
Message-ID: <U87V6.4040$pb1.154240@www.newsranger.com> (raw)
In-Reply-To: eV6V6.8331$6d5.1657665@news2-win.server.ntlworld.com

In article <eV6V6.8331$6d5.1657665@news2-win.server.ntlworld.com>, chris.danx
says...
>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');

I don't think you can use the '|' character that way. I'm not sure what your
right hand side would even mean if it were valid.

Probably the easiest way to do this would be:

basic_16 : constant array_16 := "0123456789abcdef";

Of course it would be even easier to just use "String" (or a subtype thereof)
instead of making your own character array type. But you may have your reasons
for that.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



  reply	other threads:[~2001-06-11 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-11 17:08 A quickie problem with an array and a right hand bracket chris.danx
2001-06-11 17:24 ` Ted Dennison [this message]
2001-06-11 22:45 ` Jeffrey Carter
2001-06-12 10:01 ` chris.danx
replies disabled

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