[thelist] CF: TypeOf() ?

Jeff Howden jeff at jeffhowden.com
Wed Jul 30 14:50:45 CDT 2003


frank,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Frank
>
> CF has a lot of functions along the lines of IsArray()
> or IsStruct(), but is there a function that returns the
> type of value for a value? Example TypeOf(my_string)
> returns "string"/
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

cf is inherently typeless.  by that i mean that simple values aren't stored
as numbers, strings, lists, etc., pretty much identical to how javascript
works.  if you need to be able to make the distinction between simple and
complex values, you can use the IsSimpleValue() function before trying to
display the variable value.

if you need to be able to do stronger typing and are using cfmx, you *might*
be able to leverage something in java.  however, the cost/benefit ratio
probably isn't on your side.

good luck,

.jeff

------------------------------------------------------
Jeff Howden - Web Application Specialist
Resume - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/




More information about the thelist mailing list