Perfect! That's exactly the kind of rule of thumb answer I needed, thanks
Aaron
Michael Buffington
[EMAIL PROTECTED]
(714) 556-3890 x222
http://www.price.com
By the way, Richard Wrighstman says hi.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 9:40 AM
To: CF-Talk
Subject: Rule of Thumb
Hi Michael,
#'s are only needed in three situations: a) within a <cfoutput></cfoutput>
to evaluate the value of a variable and b) within a function when you are
combining a string with a var ie: (trim(evaluate("form.email_#i#")) and c)
within a custom tag ie: <cfmail to="#form.email#"..>
Maybe?
Aaron
------ Original Message ------
From: Michael Buffington <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Jan 22, 2001 04:56 PM
Subject: Rule of Thumb
>I need a one sentence "rule of thumb" that explains how and when to use #'s
>in code:
>
>Old way:
><cfset var1 = #RandRange(1,6)#> <-- the #'s are not needed
>
>New way:
><cfset var2 = RandRange(1,6)> <-- cleaner, faster, better
>
>There are obvious exceptions to this rule (within CFOUTPUT, and within
>certain tags like <cfloop from="#var1#"...), and the exceptions should be
>included in the rule of thumb.
>
>Anyone know how to say it cleanly?
>
>Michael Buffington
>[EMAIL PROTECTED]
>(714) 556-3890 x222
>http://www.price.com
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists