Description

Determines whether a value is an object.

Returns

True, if the value represents a ColdFusion object. False if the value is any other type of data, such as an integer, string, date, or struct.

Category

Syntax

IsObject(value)

See also

History

ColdFusion MX: Added this function.

Parameters

Parameter

Description

value

A value, typically the name of a variable.

Usage

This function returns False for query and XML objects.

Example

 

<cfscript>
    random = createObject( "java", "java.security.SecureRandom" ).getInstance("SHA1PRNG");
    writeOutput( isObject( random ) );
   example = { 'name' = 'I am a struct' };
   writeOutput( isObject( example ) );    
</cfscript>

Output

YES

NO

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy