To somewhat answer part of this, in the past I've come to the conclusion
that IIF is slower than CFIF; I don't remember if that's based on my own
tests or someone else's reports. I still use IIF when it makes something
generally more readable, but not too often...
-----Original Message-----
From: Cornillon, Matthieu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 10:12 AM
To: CF-Talk
Subject: RE: string to number
Steve,
As long as you keep your ranges as you have them in your If statements, the
following formula should yield the correct result. I know this doesn't
address the question that you asked, but others have responded to that, and
I just couldn't help fiddling. Hope you don't mind.
<CFSET Grp=("form.adult + form.children")>
<CFSET SmRmRq=0>
<!--- The \ in this formula is correct. --->
<CFSET SmRmRq=Iif(Grp LTE 28,(Grp-1)\4+1,8)>
Of course, this is harder to modify in the future, should one range change.
I'm also not sure whether it runs slower or faster. I am still not sure
whether my obsession with physically compact code runs counter to good
programming sense. I guess I should flip through a CS book!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists