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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b34ecb04700058dd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-13 19:13:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!opentransit.net!wanadoo.fr!freenix!enst.fr!not-for-mail From: sk Newsgroups: comp.lang.ada Subject: Re: how to parse words from a string Date: Wed, 13 Nov 2002 21:09:06 -0600 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: 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 1037243582 9521 137.194.161.2 (14 Nov 2002 03:13:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 14 Nov 2002 03:13:02 +0000 (UTC) Return-Path: X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19-4.3mdk i686) X-Accept-Language: en Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:30844 Date: 2002-11-13T21:09:06-06:00 Hi, Caffeine Junky > Strange. I didnt get any errors when compiling it. A character is an > element of a String. Maybe I'm missing something. I'll pull out the LRM > again. procedure yyy is Break : Character := ASCII.HT; -- Horizontal Tab subtype Word is String (1 .. Break); begin null; end yyy; >> gnatmake -v yyy GNATMAKE 3.14p (20010503) Copyright 1995-2001 Free Software Foundation, Inc. "yyy.ali" being checked ... -> "yyy.ali" missing. gcc -c yyy.adb yyy.adb:5:31: incompatible types in range End of compilation gnatmake: "yyy.adb" compilation error A string is a numerically indexed array of characters in simplest terms. So using a character as an index into a string should not compile under normal (Ada) circumstances. -- ------------------------------------- -- Merge vertically for real address ------------------------------------- s n p @ t . o k i e k c c m -------------------------------------