<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>CFRETURN</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">CFRETURN</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>
コンポーネントメソッドから結果の値を返します。関数の結果として返される式が含められます。
</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>
    </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;cfreturn
   expr&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>
cfargument、cfcomponent、cffunction、cfinvoke、cfinvokeargument、cfobject、cfproperty、『ColdFusion MX 開発ガイド』の第32章の「印刷用レポートの作成」 の「ColdFusion&#160;MX&#160;7 レポート機能によるレポートの作成」
</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>
ColdFusion&#160;MX: このタグが追加されました。
</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>
このタグは、cfscript タグ内の return ステートメントに相当します。戻り値の引数を 1 つ受け入れます。複数の値が返されるようにするには、名前と値のペアを構造体に挿入し、その構造体がこのタグと共に返されるようにします。
</p>

<p>
このタグの結果の値にアクセスするには、cfinvoke タグの returnVariable 属性の値である変数スコープを使用します。
</p>

<p>
1 つの関数には、cfreturn タグを 1 つしかコーディングできません。
</p>

<p>
コード例については、『ColdFusion MX 開発ガイド』の第10章の「ColdFusion コンポーネントの作成と使用」 を参照してください。
</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><pre>&lt;cfcomponent&gt;
   &lt;cffunction name=&quot;getEmp&quot;&gt;
       &lt;cfquery name=&quot;empQuery&quot; datasource=&quot;ExampleApps&quot; &gt;
          SELECT FIRSTNAME, LASTNAME, EMAIL
          FROM tblEmployees
       &lt;/cfquery&gt;
       &lt;cfreturn empQuery&gt;
   &lt;/cffunction&gt;
   &lt;cffunction name=&quot;getDept&quot;&gt;
      &lt;cfquery name=&quot;deptQuery&quot; datasource=&quot;ExampleApps&quot; &gt;
          SELECT *
          FROM tblDepartments
       &lt;/cfquery&gt;
       &lt;cfreturn deptQuery&gt;
   &lt;/cffunction&gt;
&lt;/cfcomponent&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="EXPR">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">EXPR</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>

  </body>
</html>
