Jochem van Dieten wrote:
> How much does CF *really* need? Pseudocode:
> <cfif variables.ZIPCode LT 93711>
>        ...blahblahblah...
> <cfelseif mySwitch(variables.ZIPCode, "93712, 93713 TO
> 93940, 93950,
> 94086 TO 95050")>
>        ...blahblahblah...
> <cfelseif variables.ZIPCode GT 93711>
>        ...blahblahblah...
> </cfif>

> You just have to write mySwitch() once and put that in
> your standard UDF includefile.

I'm not sure if this could be adequately done with a UDF ( I can't think of
a decent way to do it -- do MX UDF's allow you to specify stuff like
mySwitch (exp) { mycase("a") { ... do other stuff... } } ? ) ... I could
probably do it with custom tags and <cfassociate> tho...

>> Of course, the price of this ease of coding may be
>> horrifying
>> performance for both CF and Blue Dragon... but you asked
>> ;D

> I always believed the whole point of a switch statement
> was that only
> the switch side had to be evaluated as an expression and
> the case sides
> were simple values, thereby greatly reducing the amount of
> processing.
> Comments?

That's largely been my impression...

Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to