CFMail isn't a custom tag.
Good rule of thumb (though there may be exceptions I'm not thinking of):
Attributes to CF tags will always need #, functions don't.
Evaluation of expressions don't need #, but expressions that need to be
pre-evaluated to
ie:
<cfset myvar = 10> <-- evaluation
<cfset "#myvar#" = 10> <-- preevaluation needed
Anytime you reference a CF variable outside of a tag or function, always
use #.
--
Billy Cravens
HR Web Development, Sabre
[EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
>
> 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