From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b4731a3b5d591abd X-Google-Attributes: gid103376,public From: "John G. Volan" Subject: Re: Task Discriminants & Arrays Date: 1997/05/16 Message-ID: <337CEDE1.1BAB@sprintmail.com>#1/1 X-Deja-AN: 242004639 References: <3379C86F.352@this.message> <337B09C9.62BB@sprintmail.com> <337CE7E2.7B33@sprintmail.com> Reply-To: johnvolan@sprintmail.com Newsgroups: comp.lang.ada Date: 1997-05-16T00:00:00+00:00 List-Id: Sorry, I should have added the following: John G. Volan wrote: > > Robert A Duff wrote: > > > Sorry, I don't get it. Are you saying "this is a mess"? Yeah, it is. > > Shrug. > > No, no! I think this is a great solution! Of course, you should wrap a nice abstraction around this. All that a user should have to know is that there are these tasks and they are accessible by id number: package Processes is type Process_Id_Type is range ...; function Get_New_Process_Id return Process_Id_Type; task type Process_Type (Process_Id : Process_Id_Type := Get_New_Process_Id) is ... end Process_Type; type Process_Access_Type is access all Process_Type; function Get_Process (Process_Id : in Process_Id) return Process_Access_Type; -- Note to clients: To get access to a Process_Type task, call -- Get_Process. DO NOT declare any Process_Type tasks -- of your own; this will result in Constraint_Error. -- Elaboration of this package already results in the creation -- of one task for each value in Process_Id_Type. end Processes; ------------------------------------------------------------------------ Internet.Usenet.Put_Signature (Name => "John G. Volan", Home_Email => "johnvolan@sprintmail.com", Slogan => "Ada95: The World's *FIRST* International-Standard OOPL", Disclaimer => "These opinions were never defined, so using them " & "would be erroneous...or is that just nondeterministic now? :-) "); ------------------------------------------------------------------------