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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable 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 10:44:15 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!freenix!enst!enst.fr!not-for-mail From: ANH_VO@udlp.com Newsgroups: comp.lang.ada Subject: Re:A quickie problem with an array and a right hand bracket Date: Mon, 11 Jun 2001 10:33:41 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 992281453 25016 137.194.161.2 (11 Jun 2001 17:44:13 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 11 Jun 2001 17:44:13 +0000 (UTC) To: "chris.danx" , comp.lang.ada@ada.eu.org Return-Path: Content-Description: cc:Mail note part Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:8564 Date: 2001-06-11T10:33:41-05:00 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