I knew as soon as I sent that that I missed a couple that don't do that...
always exceptions to any rule.  Sigh.
Plus, the iif() function does it recursively, so...  no, it's not a hard and
fast rule, but for the majority (that fair? ;) of functions, that is the
case.
Truman


-----Original Message-----
From: Don Vawter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 24, 2000 11:18 AM
To: [EMAIL PROTECTED]
Subject: Re: IsDefined() Problem


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/[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.

----------------------------------------------------------------------------
--
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