[ic] CONFIRMED BUG in 5.4 (Named and nested elsifs)
Grant
emailgrant at gmail.com
Tue Jul 11 11:35:02 EDT 2006
> > Yes that syntax works for me too, but the code you posted to test the
> > elsif bug returns MOO2 for me on 5.2 when it should return MOO3. Does
> > it return MOO3 for you on 5.2?
>
> Apologies, you are correct, it returns MOO2 on 5.4 as well as 5.2. I
> guess there must be a bug with elsif parsing? You could rewrite that
> statement differently to avoid the bug (obviously!)
I'm kind of puzzled as to why this bug still exists. It seems like
nested elsifs would be a widely-used function of IC. The bug does
disappear if you use positional parameters instead of named, but
evaluating two scratch variables against each other requires named
parameters.
Any chance a fix can be integrated into IC? Even an acknowledgement
of the problem from an IC developer would be nice. I've literally
been reporting this for years.
[tmpn name="test"]1[/tmpn]
[if type="scratch" term="test" op="eq" compare="2"]
INCORRECT
[elsif type="scratch" term="test" op="eq" compare="1"]
[if type="scratch" term="test" op="eq" compare="2"]
INCORRECT
[elsif type="scratch" term="test" op="eq" compare="1"]
CORRECT
[/elsif]
[/if]
[/elsif]
[/if]
- Grant
More information about the interchange-users
mailing list