comp.lang.ada
 help / color / mirror / Atom feed
From: "James Giles" <jamesgiles@worldnet.att.net>
Subject: Re: Shortcut logicals (was: Re: F200x )
Date: Tue, 01 Feb 2005 04:31:34 GMT
Date: 2005-02-01T04:31:34+00:00	[thread overview]
Message-ID: <GCDLd.714$xR1.535@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: xoKdncGq19cBZ2PcRVn-gg@comcast.com

James Van Buskirk wrote:
> "James Giles" <jamesgiles@worldnet.att.net> 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





  reply	other threads:[~2005-02-01  4:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <41f94cab$1@news1.ethz.ch>
     [not found] ` <INfKd.13707$bh6.378409@weber.videotron.net>
     [not found]   ` <nospam-6F7AE0.11340228012005@news.supernews.com>
     [not found]     ` <lqjnv01969glk2mbv1plvjdn5idkb1c3db@4ax.com>
     [not found]       ` <1107060103.157135.325010@z14g2000cwz.googlegroups.com>
     [not found]         ` <8u2pv0tdd9b1v689rtqc2c2tlm9pn9t1t6@4ax.com>
     [not found]           ` <1107085125.849687.318060@c13g2000cwb.googlegroups.com>
     [not found]             ` <1107096062.786125.100030@f14g2000cwb.googlegroups.com>
     [not found]               ` <10vq094k09igv3c@corp.supernews.com>
     [not found]                 ` <eudLd.43724$8u5.37685@bgtnsc04-news.ops.worldnet.att.net>
     [not found]                   ` <1107160100.162171.223490@f14g2000cwb.googlegroups.com>
     [not found]                     ` <cTxLd.126318$w62.46060@bgtnsc05-news.ops.worldnet.att.net>
     [not found]                       ` <xfKdnUflrtW3I2PcRVn-og@comcast.com>
     [not found]                         ` <rEzLd.68$xR1.54@bgtnsc04-news.ops.worldnet.att.net>
     [not found]                           ` <ON-dnSQzGfXOVWPcRVn-1A@comcast.com>
     [not found]                             ` <mXzLd.100$xR1.94@bgtnsc04-news.ops.worldnet.att.net>
2005-02-01  0:56                               ` Shortcut logicals (was: Re: F200x ) James Van Buskirk
2005-02-01  1:16                                 ` Robert A Duff
2005-02-01  6:49                                   ` Shortcut logicals Martin Dowie
2005-02-01 13:46                                     ` Robert A Duff
2005-02-01  8:08                                   ` Shortcut logicals (was: Re: F200x ) Martin Krischik
2005-02-01  1:43                                 ` James Giles
2005-02-01  2:33                                   ` James Van Buskirk
2005-02-01  2:53                                     ` James Giles
2005-02-01  3:49                                       ` James Van Buskirk
2005-02-01  4:31                                         ` James Giles [this message]
2005-02-01  8:49 Christoph Grein
2005-02-01 11:43 ` Martin Krischik
2005-02-01 12:45   ` Adrien Plisson
2005-02-01 14:03     ` Martin Krischik
2005-02-01 14:56       ` Les
2005-02-01 16:57       ` Frank J. Lhota
2005-02-01 17:55       ` Dan Nagle
2005-02-01 18:25         ` James Giles
2005-02-01 13:57   ` Robert A Duff
replies disabled

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