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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec4a7355f321a22b X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx01.iad01.newshosting.com!newsfeed-east.nntpserver.com!nntpserver.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Fri, 21 May 2004 14:42:02 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <40ACC50E.9040406@mail.usyd.edu.au> <40adcdfe_1@baen1673807.greenlnk.net> Subject: Re: Task discriminants Date: Fri, 21 May 2004 14:42:06 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-KwULECbi74/vfQ3k5j4Wivzl8UQyDIAdX6Vcyev5QvzhHFrzIeYebZM6k5otaovcwmkV4qEbWD4kfQK!cpOW/buxo2VCSKtGJ1KfyCdySOqGHABDqBUeYMD+5yzoOOQVF8IZgtqyKGfx4kYr7P1xV2ISWjM1 X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.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.1 Xref: controlnews3.google.com comp.lang.ada:753 Date: 2004-05-21T14:42:06-05:00 List-Id: "Martin Dowie" wrote in message news:c8kti8$p07$1@titan.btinternet.com... > "Phil Slater" wrote in message > news:40adcdfe_1@baen1673807.greenlnk.net... > > This prompts the question, "are tasks on an array elaborated in order from > > low-index to high-index? So is Martin's code below guaranteed to make each > > task's discriminant the same as its index on the array? I looked in RM95 but > > couldn't locate order of elaboration of array elements. > > > > If so, it's potentially useful for setting up an array of tasks that passes > > data up and down the array by each rendezvousing with its neighbours. > > (Obviously the start value of Id and the index range of the array have to be > > consistent.) > > > > But if the order of elaboration isn't guaranteed, we're back to the old > > "roll-call" initialisation rendezvous again. > > Difinately one for the language lawyers but _in_the_real_world_ I've yet to > come across a compiler that did anything other than the 'sensible' thing. > > Randy are there? :-) The RM says "arbitrary order" for initializing subcomponents of object declarations (see 3.3.1(20) - this is the "fourth step"). So you can't depend on it. OTOH, it's fairly hard to imagine why an implementation would do anything other than use a loop to do it, which would of course give the right answer. So practically, it probably would work right. Randy.