comp.lang.ada
 help / color / mirror / Atom feed
From: agate!dog.ee.lbl.gov!network.ucsd.edu!ogicse!verdix!mark@ucbvax.Berkeley. EDU  (Mark Lundquist)
Subject: Re: and then
Date: 7 Apr 93 22:58:57 GMT	[thread overview]
Message-ID: <9560@verdix.verdix.com> (raw)

In article <1993Apr7.173556.17184@sei.cmu.edu> ae@sei.cmu.edu (Arthur Evans) wr
ites:
>In connection with a discussion of Ada's short-circuit control forms,
>sampson@nosc.mil (Charles H. Sampson) says
    Ada compiler writers appear to have abdicated their responsibility
    and make no attempt to determine when boolean operations can be
    optimized as short-circuit.

  Well, I'm not surprised that they make no such attempt, but it's not
  because they have abdicated any responsibility.  ARM 4.5(5) says of
  expressions involving 'and' and 'or':
     The operands ... are evaluated in some order that is not defined by
     the language (but before application of the corresponding operator).
  In other words, both operands MUST be evaluated.  That requirement is
  not unreasonable given the availability of the short-circuit forms.
>
 

I don't think it means anything MUST be evaluated.  If you write

	if TRUE and TRUE then
		do_something;
	end if;

are you saying the RM says that code must be generated to evaluate
the operands and apply the operator?

The RM is not talking about implementation, it is specifying the
*logical* semantics of these operators.

             reply	other threads:[~1993-04-07 22:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-07 22:58 Mark Lundquist [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-04-12 18:38 and then Charles H. Sampson
1993-04-12 13:29 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!noc.n
1993-04-11  3:55 Michael Feldman
1993-04-10 19:52 Alex Blakemore
1993-04-10 15:43 Dik T. Winter
1993-04-10 15:36 Dik T. Winter
1993-04-10  9:39 munnari.oz.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!usenet
1993-04-10  1:03 Charles H. Sampson
1993-04-09 18:08 Dave Bashford
1993-04-09 14:06 Dan Rittersdorf
1993-04-08 22:35 Andrew Dunstan,,2285592,
1993-04-08 22:28 Alex Blakemore
1993-04-08 19:03 Art Duncan
1993-04-08 16:18 Charles H. Sampson
1993-04-08 15:34 Christopher J. Henrich
1993-04-08 12:21 enterpoop.mit.edu!usc!cs.utexas.edu!mars.tsd.arlut.utexas.edu!gardner
1993-04-07 21:07 Ray Harwood -- Data Basix: (602)721-1988
1993-04-07 16:21 Charles H. Sampson
1993-04-07 12:42 Robert Firth
replies disabled

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