STRUCTCOUNT  
説明

構造体内のキーの数を数えます。

 
戻り値

数値。structure が存在しない場合は例外が発生します。

 
カテゴリ

構造体関数

 
関数のシンタックス
StructCount(structure)
 
関連項目

構造体関数、『ColdFusion MX 開発ガイド』の第35章の「XML および WDDX の使用」 の「ColdFusion XML オブジェクトの変更」

 
ヒストリ

ColdFusion MX: 動作の変更 : この関数は、XML オブジェクトに使用できます。

 
パラメータ

 
<!--- この例は参照のみで、StructCount の使用方法を示しています。 --->
<p>このファイルは、StructNew、StructClear、および StructDelete で呼び出される addemployee.cfm に
類似しています。テストするには、StructCount 関数を "addemployee.cfm" ファイル内の適切な場所にコ
ピーしてください。
<!--- 
<cfswitch expression = "#ThisTag.ExecutionMode#">
  <cfcase value = "start">
   <cfif StructIsEmpty(attributes.EMPINFO)>
    <cfoutput>エラー。従業員データが渡されていません。</cfoutput>
     <cfexit method = "ExitTag">
   <cfelse>
    <cfquery name = "AddEmployee" datasource = "cfdocexamples">
     INSERT INTO Employees
       (FirstName, LastName, Email, Phone, Department)
      VALUES
       <cfoutput>
        (
         '#StructFind(attributes.EMPINFO, "firstname")#' ,
         '#StructFind(attributes.EMPINFO, "lastname")#' ,
         '#StructFind(attributes.EMPINFO, "email")#' ,
         '#StructFind(attributes.EMPINFO, "phone")#' ,
         `#StructFind(attributes.EMPINFO, "department")#'
         )
       </cfoutput> 
     </cfquery>
   </cfif>
   <cfoutput><hr>従業員情報の追加が完了しました。
     <p>#StructCount(attributes.EMPINFO)# 列が追加されました。</cfoutput>
  </cfcase>
</cfswitch> --->
STRUCTURE  
キーの数を調べる構造体です。