From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aed6eac65b3bc766 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-11 20:16:47 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttls1.wa.home.com.POSTED!not-for-mail From: "DuckE" Newsgroups: comp.lang.ada References: Subject: Re: Re:A quickie problem with an array and a right hand bracket X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Tue, 12 Jun 2001 03:16:47 GMT NNTP-Posting-Host: 24.248.45.203 X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 992315807 24.248.45.203 (Mon, 11 Jun 2001 20:16:47 PDT) NNTP-Posting-Date: Mon, 11 Jun 2001 20:16:47 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:8593 Date: 2001-06-12T03:16:47+00:00 List-Id: Personally, I prefer basic_16 : constant array_16 := "0123456789abcdef"; for this case. SteveD 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" > 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 > >