Related articles |
---|
writing a compiler... ltk_RE_MO_VE_@libero.it (Tommy) (2003-06-03) |
Re: writing a compiler... vrotaru@seznam.cz (Vasile Rotaru) (2003-06-05) |
Re: writing a compiler... m.a.ellis@ucsnew1.ncl.ac.uk (2003-06-05) |
Re: writing a compiler... JeffKenton@attbi.com (Jeff Kenton) (2003-06-05) |
Re: writing a compiler... cfc@shell01.TheWorld.com (Chris F Clark) (2003-06-05) |
Re: writing a compiler... Steve_Lipscombe@amat.com (2003-06-08) |
Re: writing a compiler... vbdis@aol.com (2003-06-20) |
Re: writing a compiler... Conor.ONeill.NoSpamPlease@logicacmg.com (Conor O'Neill) (2003-06-20) |
Re: writing a compiler... lex@cc.gatech.edu (Lex Spoon) (2003-06-25) |
From: | vbdis@aol.com (VBDis) |
Newsgroups: | comp.compilers |
Date: | 20 Jun 2003 00:07:01 -0400 |
Organization: | AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com |
References: | 03-06-060 |
Keywords: | optimize |
Posted-Date: | 20 Jun 2003 00:07:01 EDT |
, Steve_Lipscombe@amat.com schreibt:
>Pascal does allow this. Why not? Or, to put it another way, why would
>you expect or assume that the functions would be executed in any
>particular order?
I just encountered an very nasty case in the composition of an string.
Consider:
str := f1() + f2() + f3();
when the compiler changes the evaluation order, and the functions read
sequential information from the same stream. It's annoying when such a
statement has to be broken into multiple statements, in order to force
the required evaluation order, without any obvious reason.
Of course this is a matter of side effects, but I was very confused
when I found that problem for the first time, after decades of coding
in this way...
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.