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-25 01:49:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news.tele.dk!small.news.tele.dk!213.204.128.162!news000.worldonline.se!news-stob.telia.net!news-sto.telia.net!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: "Andreas Lans" Newsgroups: comp.lang.ada References: Subject: Re: Array problem X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Sat, 25 May 2002 08:49:34 GMT NNTP-Posting-Host: 194.237.160.178 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1022316574 194.237.160.178 (Sat, 25 May 2002 10:49:34 CEST) NNTP-Posting-Date: Sat, 25 May 2002 10:49:34 CEST Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:24738 Date: 2002-05-25T08:49:34+00:00 List-Id: Well, I tried the thing you tipped me about, and I also tried just to put a one in there just to see if it would work, but it still says Illegal operand for array conversion, any thoughts on this? "Preben Randhol" skrev i meddelandet news:slrnaetfpu.333.randhol+abuse@kiuk0156.chembio.ntnu.no... > 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