1. expression evaluation
- Posted by jiri babor <jbabor at paradise.net.nz> Oct 18, 2004
- 565 views
Rob, can I safely assume strict left-to-right expression evaluation (unless, of course, mandated otherwise by the precedence of operators)? jiri
2. Re: expression evaluation
- Posted by Robert Craig <rds at RapidEuphoria.com> Oct 18, 2004
- 592 views
jiri babor wrote: > can I safely assume strict left-to-right expression evaluation (unless, of > course, > mandated otherwise by the precedence of operators)? Yes. That's the general rule, though I'd feel safer if you would give a specific example. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: expression evaluation
- Posted by jiri babor <jbabor at paradise.net.nz> Oct 18, 2004
- 572 views
- Last edited Oct 19, 2004
Robert Craig wrote: > jiri babor wrote: >> can I safely assume strict left-to-right expression evaluation (unless, of >> course, >> mandated otherwise by the precedence of operators)? > > Yes. That's the general rule, though I'd feel safer > if you would give a specific example. Thanks, Robert. Is the following fragment specific enough? object result integer level function foo(...) ... level = ... return ... end function ... result = foo(...) * level In the last line: is foo() always evaluated first, so that level is appropriately set? Warning to resident PC hounds before they start barking about side effects, etc: don't strain your vocal cords, I am not listening...
4. Re: expression evaluation
- Posted by Robert Craig <rds at RapidEuphoria.com> Oct 18, 2004
- 552 views
- Last edited Oct 19, 2004
jiri babor wrote: > Robert Craig wrote: > > jiri babor wrote: > >> can I safely assume strict left-to-right expression evaluation (unless, of > >> course, > >> mandated otherwise by the precedence of operators)? > > > > Yes. That's the general rule, though I'd feel safer > > if you would give a specific example. > > > Thanks, Robert. Is the following fragment specific enough? > > object result > integer level > > function foo(...) > ... > level = ... > return ... > end function > > ... > result = foo(...) * level > > > In the last line: is foo() always evaluated first, so that level is > appropriately set? Yes. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com