[ic] Nested ELSIFs

Mike Heins mike at perusion.com
Sun Oct 5 16:17:09 EDT 2003


Quoting Ed LaFrance (edl at newmediaems.com):
> At 08:00 PM 9/2/2003 -0700, you wrote:
> 
> >The syntax is still correct right?  But, if you test it like this:
> >
> >[tmp whatever]that[/tmp]
> >[if scratch variable]
> >[then]
> >        [if value something]
> >                number 1
> >        [/if]
> >[/then]
> >[elsif !scratch variable]
> >        [if scratch whatever eq this]
> >                number 2
> >        [elsif scratch whatever eq that]
> >                number 3
> >        [/elsif]
> >        [/if]
> >[/elsif]
> >[/if]
> >
> >"number 3" should print to the screen but you get "number 2" instead.
> >
> >- Grant
> 
> I can confirm this in a 4.9.8 catalog, so it does appear that [elsif]'s do 
> not nest. This would be a case where you would be better off using 
> [explicit] or some perl.

I have fixed this so that nested [elsif] should work. Thanks for
finding the problem, guys.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike at perusion.com>

There's nothing sweeter than life nor more precious than time.
-- Barney


More information about the interchange-users mailing list