> ## 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:else

> 親の条件分岐キーワード（arc:exists やarc:match など）が条件を満たさない場合に、代替のコードブロックを実行します。

export const siteNameShort = "Arc";

`arc:else` キーワードを使用して、[arc:exists](./op-arc-exists) や[arc:match](./op-arc-match) などのテストが失敗した場合に、代替のコードブロックを実行します。また、呼び出しがアウトプットアイテムを生成することに失敗した場合に、[arc:call](./op-arc-call) 内の代替コードブロックを実行するためにも使用できます。

他の言語とは異なり、{siteNameShort}Script では、`arc:else` 構文がそれが属するテストスコープ内にある必要があります。

## パラメータ

None

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

None

## 例

ファイルに名前がない場合には、プレースホルダータイトルを返します：

```xml theme={null}
<arc:call op="fileListDir" out="out">
  <arc:null attr="filename">
    <arc:set attr="title" value="Unnamed File"/>
    <arc:else>
      <arc:set attr="title" value="[filename]"/>
    </arc:else>
  </arc:null>
  <arc:push title="[title]">
  [out.*]
  </arc:push>
</arc:call> 
```

## 関連項目

* [arc:exists](./op-arc-exists)：アトリビュートが存在するかどうかをチェックする。
* [arc:equals](./op-arc-equals)：同じ値かどうかをチェックする。
