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,866f55656f224cc8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-18 02:30:39 PST Message-ID: <40333D73.9080105@nowhere.com> Date: Wed, 18 Feb 2004 18:24:51 +0800 From: Adrian Hoe User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.4.1) Gecko/20020518 Netscape6/6.2.3 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Question from newbie References: <40302ec4$1_2@news.tm.net.my> <4033365e_1@news.tm.net.my> <40333d38_1@news.tm.net.my> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 219.95.190.199 X-Original-NNTP-Posting-Host: 219.95.190.199 X-Trace: news.tm.net.my 1077100160 219.95.190.199 (18 Feb 2004 18:29:20 +0800) Organization: TMnet Malaysia Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mathworks.com!news-out.cwix.com!newsfeed.cwix.com!news1.tm.net.my Xref: archiver1.google.com comp.lang.ada:5647 Date: 2004-02-18T18:24:51+08:00 List-Id: Adrian Hoe wrote: > Jacob Sparre Andersen wrote: > >> Cecilia Chew wrote: >> >>> Put ("Please enter 1 to 10 characters only!"); >>> else >>> Put ("Please enter" & Integer'Image(Num) & " characters : "); >>> for Character_number in Index'First .. Num loop >>> Get (Input(Character_number)); >> >> >> >> [ here's line 36 - I think ] >> >> Did you actually enter "Num" characters in the range 'a' .. 'z'? >> >> A "Constraint_Error" indicates that something is out of range. It >> can't be "Character_Number", since both "Index'First" and "Num" are >> valid values of the subtype "Index" (and "Character_Number" thus >> always will be a valid index for the array "Input"). >> >> The alternative is that the character you entered wasn't in the valid >> range for "Input (Character_Number)", i.e. in the range 'a' .. 'z'. > > > No. That is fine. Look into line 36 carefully and you shall find the > mistake. :) This is line 36: > Ascending (Left => Input(Character_Number), > Right => Input(Character_Number + 1)); -- Adrian Hoe m a i l b o x AT a d r i a n h o e . c o m