comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Lazy evaluation
Date: Tue, 23 Sep 2014 21:12:57 +0200
Date: 2014-09-23T21:12:57+02:00	[thread overview]
Message-ID: <1hwleoxlmvh6e$.uvanyfuy5yng.dlg@40tude.net> (raw)
In-Reply-To: lvrnen$joh$1@speranza.aioe.org

On Tue, 23 Sep 2014 15:01:29 +0300, Victor Porton wrote:

> Dmitry A. Kazakov wrote:
> 
>> Consider the problem of evaluation order:
>> 
>>    X : String := String'Input (File) & String'Input (File); -- Ill
>>    defined!
> 
> I don't understand why it's ill defined. Please explain.

If the stream contains "a" followed by "b", X can be "ab" or "ba" depending
on the evaluation order of arguments.

Compare it with

   expr1 and expr2    vs.   expr1 and then expr2

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


      reply	other threads:[~2014-09-23 19:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 19:15 Lazy evaluation Victor Porton
2014-09-19 13:51 ` Peter Chapin
2014-09-19 14:47   ` Dmitry A. Kazakov
2014-09-23 12:01     ` Victor Porton
2014-09-23 19:12       ` Dmitry A. Kazakov [this message]
replies disabled

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