Actually, [element] is a variable.....

-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 4:49 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] OT: A struct key exists, but the value is
undefined, how can you check to make sure its defined?


These are symantically equivalient, and is also legal CF:

isDefined("myStruct.element")
isDefined("myStruct") AND isStruct(myStruct) AND structKeyExists(myStruct,
"element")

You'll HAVE to use something of the latter form if "element" is not a valid
CF variable name (contains a space or dash), but otherwise the first format
will work.

Cheers,
barneyb

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Justin Balog
> Sent: Monday, February 02, 2004 3:18 PM
> To: '[EMAIL PROTECTED]'
> Subject: [CFCDev] OT: A struct key exists, but the value is 
> undefined, how can you check to make sure its defined?
> 
> 
> Just curious if you could do.....
> 
> isDefined("myStruct[element]")
> 
> Doesn't seem to work?
> 
> Thanks,
> 
> Justin
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[EMAIL PROTECTED]
> 

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to