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,e9744fb3474f9427 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-24 10:34:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Enormous problems in one of my programs! Date: 24 May 2002 13:14:52 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1022260905 7245 128.183.220.71 (24 May 2002 17:21:45 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 24 May 2002 17:21:45 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:24662 Date: 2002-05-24T17:21:45+00:00 List-Id: b99andla@student.his.se (Kladde) writes: > Helllo! I have a home assignment in ADA, and sice Im not used to this > language I need some help, I would be very greatful. Below I will > insert a start, header and body file and any faults or problems you > can find I will be very happy for. Under the code I will insert the > compile failures I get when trying to compile. > > All help is greatly appreciated!! The biggest problem is the syntax for a protected body. Also, you have "Island_T" in the spec, but "Island" in the body. Fix those problems, and you'll get more helpful errors from the compiler. Here is the correct syntax for the body of Island_T: protected body Island_T is entry Get_Random_Female(hona: out Server_P) when True is begin hona := honor(par); return; end Get_Random_Female; procedure Breed is begin if(par <= 100) then hanar(par) := new Male; honor(par) := new Female; par := par+1; end if; end Breed; end Island_T; The compiler still reports errors here, but you should be able to figure them out. -- -- Stephe