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,a31acccf6053ab1b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-24 15:31:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!mango.news.easynet.net!easynet-melon!easynet.net!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Array problem Date: Fri, 24 May 2002 22:31:25 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0156.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1022279485 17531 129.241.83.82 (24 May 2002 22:31:25 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Fri, 24 May 2002 22:31:25 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:24700 Date: 2002-05-24T22:31:25+00:00 List-Id: On Fri, 24 May 2002 22:09:41 GMT, Andreas Lans wrote: > Thanks for all your help so far, I got the program working at least, but now > a runtime error has started to come up, and the thing its complaining about > is this: > > if(pairs <= 100) then > > Clients(Pairs) := new Male; > > Servers(Pairs) := new Female; > > Pairs := Pairs+1; > > > > Where Pairs is an integer, I thought I could use this to store Females and > Males in the array but when I try this, it says: Illegal operand for array > conversion, any thoughts on this?? if you look in the spec file (.ads) you see that the array is defined from 1 .. 100 and your Pairs start with 0. This means you are trying to access outside the bounds of the array. Either change the pairs initiation to 1 or do: Pairs := Pairs+1; if(pairs <= 100) then Males (Pairs) := new Male; Females (Pairs) := new Female; end if; Now the program won't crash, but it won't do much either. Preben