[thelist] [CF] Value of a url var with no value

Warden, Matt mwarden at mattwarden.com
Mon Jul 30 11:23:53 CDT 2001

On Jul 30, Raymond Camden had something to say about RE: [thelist] [CF]...

>The value should be "". CF has no concept of 'null'.
>If you want to combine a test for foo not existing or equal to "", you can
>Then you can test for either the non existance or empty value of by doing:
><CFIF URL.Foo IS "">
>or even better (quicker)
><CFIF NOT Len(Trim(URL.Foo))>

Thanks Raymond. Unfortunately, I can't change the default value because
quite a bit of code depends on that default value being numeric.

What I don't understand is, even if there is no concept of null, why this
doesn't match:

<cfcase value=",0" delimiters=",">
	<!--- do stuff --->

Is this not the same as:

<cfcase value="">
	<!--- do stuff --->

<cfcase value="0">
	<!--- do stuff --->


I don't want to have to duplicate the same code in two places. That's
plain icky. So, how can I do this? Should I be using a method other than
delimiters="," to allow for multiple values in a single case?



More information about the thelist mailing list