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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: tasks as part of record Date: Sun, 05 Oct 2014 11:11:27 +0300 Organization: Tidorum Ltd Message-ID: References: <294a973f-5222-4aa3-8971-777cd2eb9174@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net l4OZFtK/GP2cUtTZDfAC0wbrnqk1xScDOFyRZV08YobzrCuyyt Cancel-Lock: sha1:hwCzia2/LJ5OHKOQxHGaNG1dfyE= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <294a973f-5222-4aa3-8971-777cd2eb9174@googlegroups.com> Xref: news.eternal-september.org comp.lang.ada:22100 Date: 2014-10-05T11:11:27+03:00 List-Id: On 14-10-04 16:11 , Stribor40 wrote: > ... can someone show me how to create few records where each > record contain task please. Say if I want record Student... > > type Student is record > Student_Number : Positive range 1 .. N; > Name : String(1..20); > Count : Integer ; > --??tasks > end record; Embedding tasks in the data structure is usually not a good idea. For one thing, tasks are "limited" types, so the Student record type also becomes "limited", and you can no longer move such record objects from here to there with assignment statements. For another thing, each task needs its own stack and control structures, which can consume significant amounts of memory. Finally, the execution state of a task can be complex and is private to the task and is not directly visible or controllable from "outside", as the values of other kinds of data-structure components are. Can you explain what you want to accomplish here? What is this task supposed to do, and why must it be embedded in a Student record? -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .