>From what I know, cfif/cfset is faster - however it will not make a real difference 99% of the time. I say use cfparam since it makes the code cleaner - especially if you are also doing validation...
<cfparam name="attributes.r_val" default="max" type="variableName"> ======================================================================= Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email : [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Rob Baxter [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 24, 2002 12:08 PM > To: CF-Talk > Subject: RE: setting empty vars - CFSET or CFPARAM? (was: Reg > Expr help) > > > Perhaps what was meant was that instead of using: > > <cfparam name="a_var" default="1"> > > you should use: > > <cfif Not IsDefined("a_var")> > <cfset a_var = 1> > </cfif> > > when you're initializing variables which may already exist. > > I've heard the second version is sligtly faster. Although in > practice I > haven't really been able to observe much difference either way. > > Of course in the situation where you want to be sure a > variable is null > (""), obviously cfset is the only way to go. > </rob> > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

