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-25 00:19:53 PST From: "Liao Choon Way" Newsgroups: comp.lang.ada Subject: Re: Enormous problems in one of my programs! Date: Sat, 25 May 2002 09:26:47 +0800 Organization: ST Training and Simulation Pte. Ltd. Message-ID: References: NNTP-Posting-Host: cm121.omega12.scvmaxonline.com.sg X-Trace: engel.scvmaxonline.com.sg 1022289908 764779 218.186.12.121 (25 May 2002 01:25:08 GMT) X-Complaints-To: iass@elgar.scvmaxonline.com.sg NNTP-Posting-Date: Sat, 25 May 2002 01:25:08 +0000 (UTC) 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 Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!ctu-gate!news.nctu.edu.tw!newsgate.cuhk.edu.hk!cuhk-bullish!newsvr.starhub.net.sg!elgar.scvmaxonline.com.sg!not-for-mail Xref: archiver1.google.com comp.lang.ada:24723 Date: 2002-05-25T09:26:47+08:00 List-Id: Haa haa... replies seem to come from people who have quite some experience teaching... giving away some hints but not too much as to spoon-feed... As a software engineer I'd rarely have that kind of patience... if someone asks me about Ada (we're mostly a C/C++ shop) I'd 1. Spoonfeed him so he/she doesn't bother me anymore... but usually they suffer indigestion. 2. Tell him/her I'm busy and I look for them when I'm free... "Stephen Leake" wrote in message news:ud6vlmprn.fsf@gsfc.nasa.gov... > 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