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 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!87.79.20.105.MISMATCH!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool3.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="iso-8859-1" Content-Transfer-Encoding: 8bit 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> Date: Tue, 6 Jul 2010 09:36:42 +0200 Message-ID: <1wl74eppoqii9$.1oxpbe851z3jk$.dlg@40tude.net> NNTP-Posting-Date: 06 Jul 2010 09:36:43 CEST NNTP-Posting-Host: 140b17ba.newsspool2.arcor-online.net X-Trace: DXC=IRJXM967b@jf1oJaJ0@dmgA9EHlD;3Ycb4Fo<]lROoRa8kF On Mon, 5 Jul 2010 15:47:41 -0700 (PDT), Phil Clayton wrote: > On Jul 5, 2:12�pm, "Dmitry A. Kazakov" > wrote: >> On Sun, 4 Jul 2010 18:27:04 -0700 (PDT), Phil Clayton wrote: >>> In my view, condition expressions are a step in the right direction... >>> but I'm the sort of person who wants to write an array aggregate like >> >>> � (for I in 1 .. 5 => (for J in 1 .. 7 => (if I = J then 1.0 else >>> 0.0))) >> >> � (for I in 1..5 => (for J in 1..7 => Float (Boolean'Pos (I = J)))) > > Yep, I should have seen that one coming straight back... and taken > steps to avoid it :) BTW, is your construct 1) a macro expansion (as I remember PL/1 preprocessor also had %for statement alike) and how far are you ready to go allowing "for" macros? Loops unrolling? Or else 2) it is an attempt to name the components of an array element index. In the latter case (I, J : others => ) (I : 1..5 => ) (Odd : 1 | 3 | 5 | 7 => , others => 0.0) etc looks to me more consistent with existing Ada, e.g. when Error : others => in exception handlers. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de