Re: Compound expression and order of evaluation
- From: Jeff Hobbs <jeffh@xxxxxxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 11:53:11 -0700
jo@xxxxxxxxxxxxxxxx wrote:
Can anybody confirm for that in the following code, that the regsub...
expression is always evaulated first, so that I can be certain that
Extras will always be correctly set? I've looked on the Wiki and in
"Practical Programming" but I cannot find the answer.
if {([regsub -all {[0-1]} $BitMap "" Extras] == $LengthCheck) &&
([string length $Extras] == 0)} {
Yes, order of evaluation is left to right in Tcl expressions and does proper short-circuiting.
Jeff
.
- References:
- Prev by Date: Compound expression and order of evaluation
- Next by Date: Re: Compound expression and order of evaluation
- Previous by thread: Compound expression and order of evaluation
- Next by thread: Re: Compound expression and order of evaluation
- Index(es):