Actually, you don't need them in the second situation either.  I use
the following code all the time.

        (trim(evaluate("form.email_" & i))

Kevin


>>> [EMAIL PROTECTED] 01/22/01 09:39AM >>>
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to