Thanks

-----Original Message-----
From: Will Swain [mailto:[EMAIL PROTECTED]]
Sent: 12 April 2001 11:01
To: CF-Talk
Subject: RE: IsDefined('') v. <cfset>


I'm not sure. I understood that for such variables you should use <cfparam>,
but I guess in reality there would probably be little or no performance gain
unless you were using it alot.

-----Original Message-----
From: Bill Davies [mailto:[EMAIL PROTECTED]]
Sent: 11 April 2001 22:17
To: CF-Talk
Subject: RE: IsDefined('') v. <cfset>


So would <cfparam> be cheaper than just doing a <cfset> anyway - say for an
Application variable whose value is constant?

-----Original Message-----
From: Will Swain [mailto:[EMAIL PROTECTED]]
Sent: 11 April 2001 17:27
To: CF-Talk
Subject: RE: IsDefined('') v. <cfset>


Yup, CFPARAMs in your application.cfm file will 'set' empty variables, which
you can fill later.

That way, you don't need to check for their existence, just see what they
are.

Cheers

Will

-----Original Message-----
From: Bob Silverberg [mailto:[EMAIL PROTECTED]]
Sent: 11 April 2001 15:29
To: CF-Talk
Subject: RE: IsDefined('') v. <cfset>


This doesn't answer your question directly, but if you are really going to
test for the existence of a variable, and create it if it doesn't exist, I'd
suggest using <cfparam> which will accomplish both of those things in one
step.  I only used IsDefined if I want to check for the existence of a
variable, and I'm NOT going to create it if it doesn't exist.

Bob

-----Original Message-----
From: Bill Davies [mailto:[EMAIL PROTECTED]]
Sent: April 11, 2001 10:12 AM
To: CF-Talk
Subject: IsDefined('') v. <cfset>


Anyone have any idea whether an IsDefined('') 'costs' more than a <cfset>?

i.e. Which is more work for the server - to test for the existence of a
variable (and create it if it doesn't exist) or create or overwrite it
anyhow?

Thanks.


Bill Davies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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