comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: my program
Date: Mon, 29 Dec 2003 19:16:57 +0100
Date: 2003-12-29T19:16:57+01:00	[thread overview]
Message-ID: <1373195.LCZ9VAWE5h@linux1.krischik.com> (raw)
In-Reply-To: bspfvv$mpo$1@atlantis.news.tpi.pl

Kasia Krysiak wrote:

> I'm start to lern ada , and i have some problems...
>  this is my new program, and i have a question how to inicialize
> Task1:Male(Id=>1); Task2:Male(Id=>2); task3:male(id=>3); (last 3 lines of
> code in loop? becouse i should to have the number od male dymaic. I
> tryided

Tasks types can be created dynamicly on the heap using new. You can also
have an array of access to a task type:

type Male_Access is access Male;
type Male_Array is array (Positive range <>) of Male_Access;
Tasks : Male_Array := (
               new Male(Id=>1);
               new Male(Id=>2); 
               new Male(id=>3);

Now you can have as many as you like.
With Regards

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




  reply	other threads:[~2003-12-29 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-29 15:07 my program Kasia Krysiak
2003-12-29 18:16 ` Martin Krischik [this message]
2003-12-29 23:02 ` Martin Dowie
replies disabled

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