If you don't know where a variable exists (i.e. form vs. URL), then I'd use
isDefined, rather than multiple structKeyExists calls.
I haven't tested it, but it's possible that you can use isDefined to check
the existance of local variables within functions. You can't use
structKeyExists in that situation, because there isn't a struct name to
reference. However, keep in mind that if isDefined doesn't find it locally,
the search will propogate up as normal (variables, form, url, cgi, at
least), so the result might not really be what you think it is.
Cheers,
barneyb
> -----Original Message-----
> From: Dawson, Michael [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 12, 2004 3:38 PM
> To: CF-Talk
> Subject: RE: StructKeyExists() vs IsDefined()
>
> Is there ever a good reason to use IsDefined rather than
> StruckKeyExists?
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Re: StructKeyExists() vs IsDefin... Sean Corfield
- Re: StructKeyExists() vs IsDefin... Sean Corfield
- RE: StructKeyExists() vs IsDefin... Spike
- Re: StructKeyExists() vs IsDefin... Sean Corfield
- Re: StructKeyExists() vs IsDefined() Matt Robertson
- Adding to dates using CreateTimeSpan() Jordan Michaels
- Re: Adding to dates using CreateTimeSpan(... Bruce Sorge
- Re: Adding to dates using CreateTime... Jordan Michaels
- Re: StructKeyExists() vs IsDefined() Jordan Michaels
- RE: StructKeyExists() vs IsDefined() Dawson, Michael
- RE: StructKeyExists() vs IsDefined() Barney Boisvert
- RE: StructKeyExists() vs IsDefined() Spike
- RE: StructKeyExists() vs IsDefined() Hugo Ahlenius
- Re: StructKeyExists() vs IsDefined() Mike Chabot