> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# arc:first

> arc:call またはarc:enum の最初の反復に対してのみスクリプトのブロックを実行します。ヘッディングの生成やフィードの最初のアイテムの確認に便利です。

export const siteNameShort = "Arc";

`arc:first` キーワードを使用して、[arc:call](./op-arc-call) または[arc:enum](./op-arc-enum) キーワードの最初の反復に対してのみ、スクリプトのセクションを実行します。これは、ヘッディングを生成したり、残りのフィードを調べる前にフィードの最初のアイテムを確認したりするのに便利な方法です。

最初の反復では、`arc:first` が`arc:call` または`arc:enum` ボディ内のどこに位置しているかに関係なく、`arc:first` ボディは`arc:call` または`arc:enum` 内のどのコードよりも先に実行されます。したがって、CData は`arc:first` を`arc:call` または`arc:enum` ボディの先頭に配置することをお勧めします。

スコープにアイテムがない場合は、`arc:first` も[arc:last](./op-arc-last) も実行されません。

## パラメータ

None

## アトリビュートの制御

None

## 例

それぞれのアイテムが行として表示されているフィードからHTML テーブルを作成します：

```xml theme={null}
<arc:call op="listCustomers">
  <arc:first>
    <table>
    <thead>
      <arc:enum item="customer">
        <td>[_attr]</td>
      </arc:enum>
    </thead>
  </arc:first>
    <tr>
      <arc:enum item="customer">
        <td>[_value]</td>
      </arc:enum>
    </tr>
  <arc:last>
    </table>
  </arc:last>
</arc:call>
```

## 関連項目

* [arc:last](./op-arc-last)：最後の反復のみコードブロックを実行する。
