[ic] If Else Statement

Ed LaFrance edl at newmediaems.com
Mon Oct 13 16:03:47 EDT 2003


At 02:24 PM 10/13/2003 -0700, you wrote:

> > I would not recommend doing the following in an iterative list (like the
> > results.html page, for instance), but if this is just a one-off
> > thing, like
> > on flypage.html, you can do:
> >
> > [tmp field_contents][item-field category][/tmp]
> >
> > [if scratch field_contents eq schwinn]
> > ...
> > [elsif scratch field_contents eq mongoose]
> > ...
> > [/elsif]
> > [elsif scratch field_contents eq something_else]
> > ...
> > [/elsif]
> > [else]
> >   some other value: [scratch field_contents]
> > [/else]
> > [/if]
> >
> >
> > - Ed L.
>
>Ed,
>    Why do you say not to use that in an iterative list?  That code doesn't
>seem too slow to me.  Maybe saving values to scratch variables is slower
>than I thought.
>
>- Grant

I said I would not recommend it. It is ok to do so, but the stand-alone 
[if] is one of the slower ways to make a conditional test in an iterative 
list. That does not mean that the slowness will be perceptible; it depends 
upon conditions and other factors.

- Ed



===============================================================
New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          edl at newmediaems.com
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax
=============================================================== 



More information about the interchange-users mailing list