[ic] "nested elsif problem" still exists in 5.0

Grant emailgrant123b at yahoo.com
Wed Mar 17 15:31:01 EST 2004


--- Jon Jensen <jon at endpoint.com> wrote:
> On Fri, 12 Mar 2004, Grant wrote:
> 
> > > > > > [tmp test]2[/tmp]
> > > > > > [if scratch test == 1]
> > > > > > INCORRECT
> > > > > > [elsif scratch test == 2]
> > > > > > 	[if test == 1]
> > > > > > INCORRECT
> > > > > > 	[elsif test == 2]
> > > > > > CORRECT
> > > > > > 	[/elsif]
> > > > > > 	[/if]
> > > > > > [/elsif]
> > > > > > [/if]
> > > > > > 
> > > > > > That code should return "CORRECT", but
> instead
> > > > > returns "INCORRECT".
> > > > > > 
> > > > > [if test == 1]
> > > > >   ^^^
> > > > >   You're missing a scratch there.
> > > > 
> > > > Sorry about that.  After fixing that, it
> started
> > > working properly.  
> > > > After a lot of testing I narrowed the problem
> down
> > > to named parameters.  
> > > > The above code works properly (once fixed as
> Kevin
> > > pointed out), but no
> > > > longer works properly when named parameters
> are
> > > used.
> > > 
> > > So are you saying there's still a bug? If so,
> can
> > > you supply code that 
> > > will reproduce it?
> > 
> > I'm using 5.0 when I see the bug.  It sounds like
> 5.1
> > is straight thanks to you.
> 
> I think there's still a misunderstanding. I tested
> the code with 5.0 and 
> it works fine. Mike was actually thinking of a
> different [if] bug that was 
> fixed recently, whereas he fixed the [elsif] bug in
> fall 2003 before 5.0 
> was released.
> 
> If you can reproduce a bug in the [if] logic under
> 5.0, please attach your 
> exact page to a reply so I can check it out.
> 
> Thanks,
> Jon

Here's code that causes the problem under 5.0:

[tmp test]2[/tmp]
[if type="scratch" term="test" op="==" compare="1"]
INCORRECT
[elsif type="scratch" term="test" op="==" compare="2"]
[if type="scratch" term="test" op="==" compare="1"]
INCORRECT
[elsif type="scratch" term="test" op="==" compare="2"]
CORRECT
[/elsif]
[/if]
[/elsif]
[/if]

If the same code is run using positional parameters
instead of named, "CORRECT" is returned as it should
be.  Also, running it under the Test Code section of
the UI causes the resulting page's format to be all
screwed up.

- Grant

__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com


More information about the interchange-users mailing list