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: 1094ba,3354bcb01bfd8111 X-Google-Thread: 103376,bda36258b2fe9834 X-Google-Attributes: gid1094ba,gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail From: "James Giles" Newsgroups: comp.lang.fortran,comp.lang.ada References: <41f94cab$1@news1.ethz.ch> <1107060103.157135.325010@z14g2000cwz.googlegroups.com> <8u2pv0tdd9b1v689rtqc2c2tlm9pn9t1t6@4ax.com> <1107085125.849687.318060@c13g2000cwb.googlegroups.com> <1107096062.786125.100030@f14g2000cwb.googlegroups.com> <10vq094k09igv3c@corp.supernews.com> <1107160100.162171.223490@f14g2000cwb.googlegroups.com> Subject: Re: Shortcut logicals (was: Re: F200x ) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 Message-ID: Date: Tue, 01 Feb 2005 04:31:34 GMT NNTP-Posting-Host: 12.72.112.193 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1107232294 12.72.112.193 (Tue, 01 Feb 2005 04:31:34 GMT) NNTP-Posting-Date: Tue, 01 Feb 2005 04:31:34 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.fortran:10035 comp.lang.ada:8100 Date: 2005-02-01T04:31:34+00:00 List-Id: James Van Buskirk wrote: > "James Giles" wrote in message > news:ZaCLd.474$xR1.216@bgtnsc04-news.ops.worldnet.att.net... > >> x/=0.0 .and. cond2 .andthen. cond3 .and. 5.0/x>10.0 > >> ?=> > >> 5.0/x>10.0 .and. x/=0.0 .and. cond2 .andthen. cond3 > >> cond2 .andthen. cond3 .and. 5.0/x>10.0 .and. x/=0.0 > > Obviously the first short-circuits the DIVCHK and the last two > don't. But, *all* are allowed rearrangements of the first! That's the existing Fortran rule. Notice I *did* assume that rearrangement of the .andthen. operation could *not* be rearranged, but the above still remain permitted implementation dependent rearrangements with respect to .and. > Obviously you don't get it. How do you know what array gets > passed to sub: You're right, I don't get it. You still insist on answering the question with an irrelevant excursion into arrayhood. Until I see the answer for scalars, I'm not sure I even want to ask about arrays. > call sub(x/=0 .AND_THEN. n > 0 .AND. f(n)) I think that even after *my* question is answered, your's still is not. If the implementation of .andthen. required parenthesis, that would answer my question. Notice that ends the relevance of Ada to this thread, since we've already been told that Ada does require parentheses. With the required parentheses rule, the above would not be syntactiaclly allowed and you would have to write: call sub(x/=0 .AND_THEN. (n > 0 .AND. f(n) ) ) But the issue you are concerned with would still exist. I suppose *this* issue address might really be solved with reference to WHERE. -- J. Giles "I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." -- C. A. R. Hoare