From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 16 Nov 92 19:19:41 GMT From: olivea!charnel!rat!koko.csustan.edu!ceti.csustan.edu!pendell@ames.arc.nas a.gov (Brian Pendell) Subject: Dynamic Tasking in ADA. Message-ID: <1992Nov16.191941.18504@koko.csustan.edu> List-Id: 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)