Yeah you are doing it wrong:-)

Try this instead:-

<cfparam name="var" default="">
<cfif var neq "">
        ... do something ...
</cfif>



-----Original Message-----
From: Paul Johnston [mailto:[EMAIL PROTECTED]]
Sent: Friday, 25 August 2000 12:57 AM
To: Cf-Talk
Subject: IsDefined() problems


Just a quickie.

I have taken to coding in this way (when I think var may be undefined):

<cfparam name="var" default="">
<cfif var eq "">
        ... do something ...
</cfif>

instead of:

<cfif IsDefined(var)>
        ... do something ...
</cfif>

Does anyone else have trouble with IsDefined() or is it just me using it
wrong?

Paul


----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to