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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d154e1596a6ac2d9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 16 Oct 2005 21:37:28 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Newbie: Task parametering References: <1129510387.675070.134750@g14g2000cwa.googlegroups.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Sun, 16 Oct 2005 21:37:28 -0500 NNTP-Posting-Host: 24.6.102.223 X-Trace: sv3-i92TrbgJoSgmnL9pjAJuVjKiBNegcKHPL4KYuD10XVK9R1mHKbaY1bEPdlIQ9gvhaPmdOTJVSSzJ/V0!h50hEPR10ahtrFmPNcaNi91PSvMyFnz5m47oeknZWPv0Xx3lv2cT9x7mB1ZtPq1YlyIVGlNL/4zV X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:5735 Date: 2005-10-16T21:37:28-05:00 List-Id: > type Task_Data is > record > Name : aliased String(1..8); and > type Data_Handle is access Task_Data; -- used to point to its data Things of type Data_Handle point to heap-allocated objects (it says "is access" not "is access all"), so you don't need any "aliased". > Data_For_Task := new Task_Data; > Data_For_Task.Name := "Task A "; > Data_For_Task.Period := 0.5; > Data_For_Task.Repetitions := 5; Data_For_Task := new Task_Data("Task A ", 0.5, 5); or, more explicitly Data_For_Task := new Task_Data( (Name => "Task A ", Period => 0.5, Repetitions => 5); Besides being shorter, these have the advantage over multiple assignment statements that the compiler will tell you if you left something out.