Forum OpenACS Development: Re: set variable into an array

Collapse
Posted by Jonathan Ellis on
actually, things like if aren't even special cases; the code in brackets is passed to the if proc as a single arg like any other use of brackets as grouping.  The if then evaluates it in the parent context so it sort of LOOKS like it got evaluated before the if but really it didn't.  Otherwise, things like

if $a {
    set b [foo]
}

would have very surprising results if foo happened to have some global side effects that you didn't always want to see!