This all makes sense if you think of what you want to do with the variable. If you 
want the *VALUE* of the variable you will not use quotes (and outside of a tag you 
will use #s). If you want to check or manipulate the *VARIABLE* itself, you will use 
quotes. 

At 11:18 AM 8/24/00 -0600, Don Vawter wrote:
>Truman,
>Applies to MOST but not ALL functions.  isarray , isstruct, structkeyexists
>come to mind as exceptions
>
>----- Original Message -----
>From: "Truman Esmond III" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, August 24, 2000 9:43 AM
>Subject: RE: IsDefined() Problem
>
>
>> 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/cf-talk@houseoffusion.com/
>> 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/cf-talk@houseoffusion.com/
>> 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/cf-talk@houseoffusion.com/
>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. 


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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