| Posted By |
Discussion Topic: NOT IsDefined("URL.*")
-- page:
1
2
|
|
Lossed |
08-08-2007 @ 8:54 PM |
|
|
Senior Member
Posts: 1095
Joined: Apr 2004
|
I've found not structCount() slightly faster than structIsEmpty().
Lossed --------------------------- When the only tool you have is a hammer, everything looks like a nail -----------------------------
|
CJ |
08-08-2007 @ 4:42 PM |
|
|
Administrator
Posts: 4262
Joined: Oct 2002
|
-CJ- @ #coldfusion/DALNet http://charlie.griefer.com Teachers open the door. You enter by yourself. —Chinese Proverb
|
Webmaster |
08-08-2007 @ 2:06 PM |
|
|
Administrator
Posts: 4533
Joined: Jan 2002
|
Yes and I was trying to show more then one way to skin a cat... Duh!
Pablo Varando Senior Application Architect EasyCFM.COM, LLC. 904.483.1457 \\ mobile webmaster@easycfm.com \\email
|
CJ |
08-08-2007 @ 1:33 PM |
|
|
Administrator
Posts: 4262
Joined: Oct 2002
|
quote:
let mek now if you have further questions
...why, so you can answer 'em a day and 8 posts after the answer had been given? :P (see abram's answer above... the thread just went on 'cuz we hit a few tangents)
-CJ- @ #coldfusion/DALNet http://charlie.griefer.com Teachers open the door. You enter by yourself. —Chinese Proverb
|
Webmaster |
08-08-2007 @ 12:49 PM |
|
|
Administrator
Posts: 4533
Joined: Jan 2002
|
Remember that the URL vars are a STRUCT. You could do: <cfif NOT StructCount(URL)> or <cfif StructIsEmpty(URL)> let mek now if you have further questions
Pablo Varando Senior Application Architect EasyCFM.COM, LLC. 904.483.1457 \\ mobile webmaster@easycfm.com \\email
|
dlackey |
08-07-2007 @ 3:08 PM |
|
|
Moderator
Posts: 935
Joined: Jun 2007
|
CJ, Thanks, clear as a bell now.
Cheers, Chip
|
CJ |
08-07-2007 @ 1:54 PM |
|
|
Administrator
Posts: 4262
Joined: Oct 2002
|
EQ vs IS is functionally equivalent. my personal preference (and it's nothing more than just that... a preference) is to use EQ to compare numeric values and IS to compare strings. <cfif myVar EQ 5> <cfif myVar IS "CJ"> i think of it as a little "extra" in the way of self documenting the code. when i see "EQ" i know that my variable is meant to be numeric. when i see "IS" i know that it's meant to be a string. but there's no difference (performance or otherwise that i know of) between <cfif myVar EQ 5> and <cfif myVar IS 5>.
-CJ- @ #coldfusion/DALNet http://charlie.griefer.com Teachers open the door. You enter by yourself. —Chinese Proverb
|
dlackey |
08-07-2007 @ 1:25 PM |
|
|
Moderator
Posts: 935
Joined: Jun 2007
|
CJ, What about 'eq' Vs. 'is'?
Cheers, Chip
|
CJ |
08-07-2007 @ 1:22 PM |
|
|
Administrator
Posts: 4262
Joined: Oct 2002
|
the use of EQ vs = is pretty straightforward... EQ is a comparison operator (if a EQ b) = is an assignment operator (set a = b)
-CJ- @ #coldfusion/DALNet http://charlie.griefer.com Teachers open the door. You enter by yourself. —Chinese Proverb
|
discogeek |
08-07-2007 @ 1:06 PM |
|
|
Junior Member
Posts: 119
Joined: Mar 2004
|
makes sense... i'm sure i'll still screw it up in my own code for the rest of this millenium, and probably next... but at least it makes sense! sort of like how some CF tags use EQ and some use =... i'm always getting them intermixed, but when an error page pops up, i know exactly where to look... thanks!
Tim Vickey Level671, LLC http://www.level671.com
|