[thelist] CF: TypeOf() ?

Raymond Camden jedimaster at mindseye.com
Wed Jul 30 15:19:09 CDT 2003


There is a UDF at cflib.org that will make a best guess at the typeOf
your data.

========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : jedimaster at mindseye.com
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: thelist-bounces at lists.evolt.org 
> [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Jeff Howden
> Sent: Wednesday, July 30, 2003 1:51 PM
> To: thelist at lists.evolt.org
> Subject: RE: [thelist] CF: TypeOf() ?
> 
> 
> 
> 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.
> 



More information about the thelist mailing list