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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1094ba,ddafdc033e838b1d X-Google-Thread: 103376,cd51fe79965e9795,start X-Google-Attributes: gid1094ba,gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!wns13feed!worldnet.att.net!attbi_s54.POSTED!53ab2750!not-for-mail From: "James Van Buskirk" Newsgroups: comp.lang.fortran,comp.lang.ada References: <40C0208A.80DBE53A@wldelft.nl> Subject: Re: Order of logical operations X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: NNTP-Posting-Host: 24.8.173.150 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s54 1086374452 24.8.173.150 (Fri, 04 Jun 2004 18:40:52 GMT) NNTP-Posting-Date: Fri, 04 Jun 2004 18:40:52 GMT Organization: Comcast Online Date: Fri, 04 Jun 2004 18:40:53 GMT Xref: g2news1.google.com comp.lang.fortran:1694 comp.lang.ada:1103 Date: 2004-06-04T18:40:53+00:00 List-Id: "Arjen Markus" wrote in message news:40C0208A.80DBE53A@wldelft.nl... > Short-circuiting does not necessarily lead to quicker programs. > And if you really need it, you might invent a new operator, > like ".cand." (the implementation ought to be very simple). As others have pointed out such operators have to be defined at the language level. Short-circuiting operators are trickier in Fortran than in Ada because to be consistent with the rest of the language they would have to be elemental. Most of the tricky stuff has already been dealt with, however, because Fortran already has masking constructs (WHERE) and there are only a few new cases left like: a(x) .and_then. b(x) when a(x) is array-valued and b(x) is scalar. I am curious as to how useful short-circuiting logical operators are considered to be in languages such as Ada that have both short-circuiting and non-short-circuiting operators. -- write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, & 6.0134700243160014d-154/),(/'x'/)); end