comp.lang.ada
 help / color / mirror / Atom feed
From: olivea!charnel!rat!koko.csustan.edu!ceti.csustan.edu!pendell@ames.arc.nas a.gov  (Brian Pendell)
Subject: Dynamic Tasking in ADA.
Date: 16 Nov 92 19:19:41 GMT	[thread overview]
Message-ID: <1992Nov16.191941.18504@koko.csustan.edu> (raw)

I am attempting to write a number of tasks for an ADA program. However,
the number of necessary tasks is not known at compile time. Thus, I
must use a dynamic data structure to hold the tasks. Since  I do not
believe ADA allows dynamic arrays, I have decided on a doubly-linked list
of tasks as a close approximation. 

Now, I must do the following:
    1. declare and elaborate the task type.
    2. Instantiate my generic list package for this task type. 
    3. write the  task body.

Previously, I had elaborated the task type, then instantiated the list 
package, then written the task body. The ada compiler I am using did not
understand this, telling me that my package instantiation occurred too late
in the source code. 

My next solution was to declare the task type, then instantiate the package
for the type, then elaborate the task type and the task body. The result
is that I cannot pass an "accept" to my tasks .. the compiler tells me
that this is an illegal operation on an incomplete type. 

I'm stuck. How am I going to 
A. build a task and 
B. Instantiate my linked list package so I can have a linked list of tasks?

Any help would be GREATLY appreciated. 

Thanks, 
	-- Brian Pendell (pendell@ceti.csustan.edu)

                 reply	other threads:[~1992-11-16 19:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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