comp.lang.ada
 help / color / mirror / Atom feed
From: "Liao Choon Way" <choonway@stts.com.sg>
Subject: Re: Enormous problems in one of my programs!
Date: Sat, 25 May 2002 09:26:47 +0800
Date: 2002-05-25T09:26:47+08:00	[thread overview]
Message-ID: <acmp5k$narb$1@engel.scvmaxonline.com.sg> (raw)
In-Reply-To: ud6vlmprn.fsf@gsfc.nasa.gov

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" <stephen.a.leake.1@gsfc.nasa.gov> 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





  reply	other threads:[~2002-05-25  1:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-24 10:13 Enormous problems in one of my programs! Kladde
2002-05-24 13:35 ` Ted Dennison
2002-05-24 13:57   ` Andreas Lans
2002-05-24 14:55 ` Preben Randhol
2002-05-24 15:26   ` Andreas Lans
2002-05-24 17:14 ` Stephen Leake
2002-05-25  1:26   ` Liao Choon Way [this message]
2002-05-25 15:31     ` Adrian Hoe
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox