Name
StructCount
Synopsis
StructCount(structure
)
Returns a count for the number of key/value pairs contained in the
specified structure. Here’s an example that returns
the number of name/value pairs contained in the structure
Employee
:
<cfset Employee=StructNew( )> <cfset Employee.Name="Pere Money"> <cfset Employee.Title="President"> <cfset Employee.Department="Executive Management"> <cfset Employee.Email="pmoney@example.com"> <cfset Employee.PhoneExt="1234"> <cfoutput> There are #StructCount(Employee)# key/value pairs in the structure. </cfoutput>
Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.