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

# arc:else

> 当父级条件关键字（如 arc:exists 或 arc:match）不满足条件时，执行替代代码块。

export const siteNameShort = "知行之桥";

arc:else 关键字用来在当 [arc:exists](./op-arc-exists) 或关键字 [arc:match](./op-arc-match) 关键字匹配异常时，执行另一个代码块。也可以在 [arc:call](./op-arc-call) 中，当调用产生输出对象失败时执行另一个代码块。

和其它语言不同，{siteNameShort}Script 要求 arc:else 语句在所属的测试作用域之内。

## 参数

无

## 控制属性

无

## 示例

如果文件没有名称则返回一个占位符标题：

```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)：检查相等性。
