comp.lang.ada
 help / color / mirror / Atom feed
From: "James Van Buskirk" <not_valid@comcast.net>
Subject: Re: Order of logical operations
Date: Fri, 04 Jun 2004 18:40:53 GMT
Date: 2004-06-04T18:40:53+00:00	[thread overview]
Message-ID: <Um3wc.43236$3x.40166@attbi_s54> (raw)
In-Reply-To: 40C0208A.80DBE53A@wldelft.nl

"Arjen Markus" <arjen.markus@wldelft.nl> 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





       reply	other threads:[~2004-06-04 18:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <slrncbtfkn.247.tconnors@tellurium.ssi.swin.edu.au>
     [not found] ` <m11xkwd6ct.fsf@macfortran.local>
     [not found]   ` <slrn-0.9.7.4-31741-29330-200406040800-tc@hexane.ssi.swin.edu.au>
     [not found]     ` <40C0208A.80DBE53A@wldelft.nl>
2004-06-04 18:40       ` James Van Buskirk [this message]
2004-06-04 20:06         ` Order of logical operations Ed Falis
2004-06-04 21:09           ` Nick Roberts
2004-06-07 17:00             ` Warren W. Gay VE3WWG
2004-06-07 17:36               ` Ed Falis
2004-06-04 21:37         ` Björn Persson
2004-06-05 10:44         ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox