<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CFARGUMENT</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="説明">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">CFARGUMENT</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">説明</span>
<p>
コンポーネント定義内にパラメータ定義を作成します。また、関数の引数を定義します。cffunction タグ内で使用します。 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">カテゴリ</span>
<p>
拡張タグ
</p>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="syntax"><span class="title">シンタックス</span><pre>&lt;cfargument
   name=&quot;string&quot; 
   type=&quot;data type&quot; 
   required=&quot;yes&quot;、&quot;no&quot; 
   default=&quot;default value&quot; 
   displayname=&quot;descriptive name&quot;
   hint=&quot;extended description&quot;   &gt;
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">関連項目</span>
<p>
cfcomponent、cffunction、cfinvoke、cfinvokeargument、cfobject、cfproperty、cfreturn
</p>

<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">使用方法</span>
<p>
このタグは cffunction タグ内に指定する必要があり、cffunction タグ本文の中で他のどのタグよりも前に置く必要があります。
</p>

<p>
メソッドの呼び出し時に渡される引数は、メソッド本文から次のようにアクセスできます。
</p>
<ul>

<li>省略型のシンタックスの場合 : #myargument#<br>(この例では、引数 myargument にアクセスします)</li>

<li>引数スコープを配列として使用する場合 : #arguments[1]#<br>(この例では、cffunction 内で最初に定義されている引数にアクセスします。)</li>

<li>引数スコープを構造体として使用する場合 : #arguments.myargument#<br>(この例では、配列内の引数 myargument にアクセスします。)</li>
</ul>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">例</span><pre>&lt;!--- この例では、コース番号のパラメータを受け取ってそのコースの説明を返す関数を定義しています。 ---&gt;
&lt;cffunction name=&quot;getDescription&quot;&gt;
   &lt;!--- 引数を定義する ---&gt;
   &lt;cfargument name=&quot;Course_Number&quot; type=&quot;numeric&quot; required=&quot;true&quot;&gt;
   &lt;!--- 引数を使用して、データベースからコース説明を取得する ---&gt;
   &lt;cfquery name=&quot;Description&quot; datasource=&quot;cfdocexamples&quot;&gt;
      SELECT Descript
      FROM Courses
      WHERE Number = &#39;#Course_Number#&#39;
   &lt;/cfquery&gt;
   &lt;!--- この関数から返される変数を指定する ---&gt;
   &lt;cfreturn Description.Descript&gt;
&lt;/cffunction&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="NAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">NAME</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">必須</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>文字列です。引数名を指定します。 </p>

  </td>
  </tr>
  </table>
</div>
<div id="TYPE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">TYPE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "any"


<p>タイプ名の文字列です。引数のデータタイプを指定します。</p><ul>

<li>any</li>

<li>array</li>

<li>binary</li>

<li>boolean</li>

<li>date</li>

<li>guid: この引数は xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx という形式の UUID または GUID でなければなりません。x は 16 進数の 1 文字 (0 ～ 9、A ～ F) を表します。</li>

<li>numeric</li>

<li>query</li>

<li>string</li>

<li>struct</li>

<li>uuid: この引数は xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx という形式の ColdFusion UUID でなければなりません。x は 16 進数の 1 文字 (0 ～ 9、A ～ F) を表します。</li>

<li>variableName: ColdFusion 変数のネーミング規則に従った形式の文字列</li>

<li>xml: XML オブジェクトと XML 文字列</li>

<li>コンポーネント名: type 属性の値が上記のどれにも当てはまらない場合、ColdFusion はそれを ColdFusion コンポーネントの名前として扱います。関数を実行したときに、渡された引数が指定の名前を持つ CFC でない場合はエラーになります。</li>
</ul>


  </td>
  </tr>
  </table>
</div>
<div id="REQUIRED">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">REQUIRED</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "no"


<p>メモ : Web サービスとして呼び出される場合は、定義方法に関係なく、すべての引数が必要です。</p>
<p>&#160;</p>
<p>コンポーネントメソッドを実行するためにパラメータが必要かどうかを指定します。default 属性を指定した場合、パラメータは必須ではありません。</p><ul>

<li>true または &quot;yes&quot; </li>

<li>false または &quot;no&quot;</li>
</ul>


  </td>
  </tr>
  </table>
</div>
<div id="DEFAULT">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DEFAULT</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>引数が渡されない場合に、デフォルトの引数値を指定します。</p>

  </td>
  </tr>
  </table>
</div>
<div id="DISPLAYNAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DISPLAYNAME</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "name 属性の値"


<p>CFC メソッドのパラメータの場合にのみ意味があります。イントロスペクションを使用して CFC についての情報を示すときに表示される値です。</p>

  </td>
  </tr>
  </table>
</div>
<div id="HINT">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">HINT</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>CFC メソッドのパラメータの場合にのみ意味があります。イントロスペクションを使用して CFC についての情報を示すときに表示されるテキストです。hint 属性の値は、パラメータ説明行の中で displayname 属性値の後に表示されます。この属性は、パラメータの目的を説明するのに役立ちます。</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
