IsDefined() vs. structKeyExists()

By | | ColdFusion

2

Sean Corfield recently blogged about the choice to use IsDefined vs. structKeyExists when trying to determine if a scoped variable (session, application, request, form url etc), exists or not.

Sean talks about how certain dot noted variables will or won’t be seen with IsDefined, BUT I found the fact that IsDefined looks for ANY possible definition even when the variable you’re searching for has been scoped.

Read his blurb to get the full effect.

Written By:

Eric Jones

Eric is an avid ColdFusion developer and gamer who currently occupies a desk in Atlanta GA where is is a Senior Application Developer and lead developer for a new Open Source CMS. Eric also sits on the Board of Directors for his local CFUG.

Website
>> More Posts By Eric Jones

 

{ 2 comments }

jonese July 30, 2004 at 9:16 am

fixed sorry about that, must have gotten lost in my cut / paste.

MarcusJT July 30, 2004 at 5:16 am

The first paragraph is an incomplete sentence… *what* are you trying to determine?!

Comments on this entry are closed.