[ic] Nested elsif bug still in 5.2

Grant emailgrant at gmail.com
Mon Jul 10 11:30:10 EDT 2006


> > I've been dealing with a nested elsif bug for a while.  I first
> > noticed it in 4.9.3:
> >
> > http://www.icdevgroup.org/pipermail/interchange-users/2003-September/035131.html
> >
> >
> > and then in 5.0:
> >
> > http://www.icdevgroup.org/pipermail/interchange-users/2004-March/038202.html
> >
> >
> > and now in 5.2.  Basically, nested elsif doesn't work when named
> > parameters are used.  Here's an example:
> >
> > [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]
> >
> > The above works correctly when positional parameters are used instead
> > of named.  Is this fixed in 5.4?
>
> The following will work:
>
> [tmpn name="test"]1[/tmpn]
>
> [if term="[scratch test]" op="eq" compare="2"]
> MOO
> [elsif term="[scratch test]" op="eq" compare="1"]
>        [if term="[scratch test]" op="eq" compare="2"]
>        MOO2
>        [elsif term="[scratch test]" op="eq" compare="1"]
>        MOO3
>        [/elsif]
>        [/if]
> [/elsif]
> [/if]

What version of IC are you running and have you tested that code?  It
doesn't work for me in 5.2.  It behaves the same way.

Also, that:

term="[scratch test]"

syntax is new to me.  Is it preferred to:

type="scratch" term="test"

> Also note, if you are comparing numbers you might want to use an op of "==".

I thought I read that using a numeric op is a little slower because it
has to call some type of extra stuff.  Is that true?

Lastly, I checked out your domain and I really like the design but
it's pretty mixed up in Firefox 1.5 on Linux.

- Grant


More information about the interchange-users mailing list