The reason the quotes are there is that you want to check the existence of
the NAME of the var, not the resolved value of your variable as the name of
the variable you are checking for... If you were to use
IsDefined(attributes.myvar) and the variable was NOT defined, you would get
an error because CF tries to evaluate the variable name inside the function
brackets, then determine if htere is a var name with the evaluated value.
The IsDefined("attributes.myvar") way checks to see if the variable scoped
and named "attributes.myvar" exists, which (generally) is how the function
is used.
This is a handy lesson to learn, as it applies to all the CF functions.
Hope that makes sense!
Truman
-----Original Message-----
From: Paul Johnston [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 24, 2000 9:02 AM
To: Cf-Talk
Subject: RE: IsDefined() Problem
Figured it out (taken me months!)
I need to put quotes in, which seems a bit irish to me as all other
functions (those I can think of off the top of my head) you don't put the
quotes in when putting in a variable.
Sorry to bother you!
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.