comp.lang.ada
 help / color / mirror / Atom feed
* Dynamic Tasking in ADA.
@ 1992-11-16 19:19 olivea!charnel!rat!koko.csustan.edu!ceti.csustan.edu!pendell
  0 siblings, 0 replies; only message in thread
From: olivea!charnel!rat!koko.csustan.edu!ceti.csustan.edu!pendell @ 1992-11-16 19:19 UTC (permalink / 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-11-16 19:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-11-16 19:19 Dynamic Tasking in ADA olivea!charnel!rat!koko.csustan.edu!ceti.csustan.edu!pendell

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