[ic] Nested ELSIFs

Ed LaFrance edl at newmediaems.com
Tue Sep 2 20:08:53 EDT 2003

At 04:02 PM 9/2/2003 -0700, you wrote:
>After running into a strange problem in my code, I've done some testing and
>found what seems like a bug to me.  After narrowing it down, the following
>seems to be the simplest correct expression of the code that causes the bug:
>[if scratch variable]
>[elsif !scratch variable]
>         [if scratch variable]
>         [elsif !scratch variable]
>                 CORRECT
>         [/elsif]
>         [/if]
>Running that code returns nothing on the screen.  Naming the parameters
>doesn't help.  Is it a bug, or are nested elsifs just not allowed?
>- Grant

Really not sure why you would write a conditional test which executes the 
same code whether a condition is true or false - doesn't seem to be much 
point in that.

In any case, the correct syntax would be:

[if scratch variable]
         [if scratch whatever eq this]
         [elsif scratch whatever eq that]
[elsif !scratch variable]
         [if value something]

...hope you get the idea. Also, this is the correct syntax, but it is quite 
possible that it could break depending upon conditions - functionality in 
all circumstances is not guaranteed.

I know that [if] went through some re-coding in 4.8, and as a result the 
use of [then] is rarely required.

- Ed L.

New Media E.M.S.              Technology Solutions for Business
463 Main St., Suite D         eCommerce | Consulting | Hosting
Placerville, CA  95667        edl at newmediaems.com
(530) 622-9421                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (530) 622-9426 Fax

More information about the interchange-users mailing list