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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,334f9012742e58fc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder3.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.93.MISMATCH!xlned.com!feeder7.xlned.com!news2.euro.net!newsfeed.freenet.ag!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Gnat GPL 2010 available soon (conditional expressions) Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <2010061621145016807-sjs@essexacuk> <0fa4c574-9539-492f-8514-d32c68beb22a@w31g2000yqb.googlegroups.com> <1frrgtpa5dycl$.12kl72iqsg3dx$.dlg@40tude.net> <4c270613$0$6974$9b4e6d93@newsspool4.arcor-online.net> <1wuwvzgwlwgli$.1birkinieia0d$.dlg@40tude.net> <1ur19ais2ejih.mjbgdsv9pr66.dlg@40tude.net> <4c275562$0$6987$9b4e6d93@newsspool4.arcor-online.net> <4c276114$0$2378$4d3efbfe@news.sover.net> <7ec98a71-edcb-4851-87fd-6702fb963829@q12g2000yqj.googlegroups.com> <8ac6b8d6-f4c0-4a8b-b3aa-ff6f2d136544@k39g2000yqb.googlegroups.com> <1wl74eppoqii9$.1oxpbe851z3jk$.dlg@40tude.net> <87dfe70c-fd5b-4b76-8e37-b38539826502@y11g2000yqm.googlegroups.com> Date: Tue, 6 Jul 2010 19:18:04 +0200 Message-ID: <4payn5nzd163$.8nb20d9btack.dlg@40tude.net> NNTP-Posting-Date: 06 Jul 2010 19:18:02 CEST NNTP-Posting-Host: 404f7e32.newsspool1.arcor-online.net X-Trace: DXC=:Hh^4hN:=kQYQ5E:l3=`J`S[6LHn;2LCV^[ On Tue, 6 Jul 2010 09:31:05 -0700 (PDT), Phil Clayton wrote: > The concept of an order is important because the function F could have > side effects in the above example (though I would not advocate that as > good practice). AFAIK, presently the order is not defined. So though this is legal X : String (1..80) := (others => Character'Read (Stream'Access)); It is not a good idea. > However, we would be able to write > > (for I in reverse A'Range => A(I)) > > to represent the reverse of the array A is perhaps a little confusing. The effect is undefined. Theoretically the compiler could initialize array elements concurrently on a multi-core processor. > Also, it really only makes sense to have one variable holding the > array index. For example, if we could write > > (I, J : 1 .. 5 => ...) > > surely I and J would always be equal: there are only 5 elements in the > array. Having > > (for I in 1 .. 5 => ...) > > syntactically rules out multiple variables. Yes, but many other things as well. However I prefer an absolutely different approach anyway, e.g. proper index types. In my world a diagonal would be initialized like: (Diagonal (5, 5) => 1.0, others => 0.0) where Diagonal is a proper function. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de