
Structure Functions
133
<table cellpadding="2" cellspacing="2">
<tr>
<td><b>Employee</b></td>
<td><b>Department</b></td>
</tr>
<!--- In cfloop, use item to create a variable
called person to hold value of key as loop runs --->
<cfloop collection=#departments# item="person">
<tr>
<td>#person#</td>
<td>#Departments[person]#</td>
</tr>
</cfloop>
</table>
</cfoutput>
Structure Functions
Use the following functions to create and manage structures in ColdFusion
applications:
Function
Description
IsStruct
Returns True if the specified variable is a structure.
StructClear
Removes all data from the specified structure.
StructCopy
Returns a new structure with all the keys and values of the
specified structure.
StructCount
Returns the number of keys in the specified structure.
StructDelete
Removes the specified item from the specified structure.
StructFind
Returns the value associated with the specified key in the
specified structure.
StructInsert
Inserts the specified key-value pair into the specified
structure.
StructIsEmpty
Indicates whether the specified structure contains data.
Returns True if the structure contains no data, and False if it
does contain data.
StructKeyArray
Returns an array of keys in the specified structure.
StructKeyExists
Returns True if the specified key is in the specified structure.
StructKeyList
Returns a list of keys in the specified structure.
StructNew
Returns a new structure.
StructUpdate
Updates the specified key with the specified value.
Содержание COLDFUSION 5-DEVELOPING
Страница 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Страница 58: ...38 Chapter 3 Querying a Database ...
Страница 134: ...114 Chapter 7 Updating Your Database ...
Страница 210: ...190 Chapter 10 Reusing Code ...
Страница 232: ...212 Chapter 11 Preventing and Handling Errors ...
Страница 238: ...218 Chapter 12 Using the Application Framework ...
Страница 262: ...242 Chapter 12 Using the Application Framework ...
Страница 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Страница 320: ...300 Chapter 15 Indexing and Searching Data ...
Страница 336: ...316 Chapter 16 Sending and Receiving E mail ...
Страница 374: ...354 Chapter 18 Interacting with Remote Servers ...