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

> 使用 arc:notnull 检查指定对象中的属性是否有值；arc:exists 是此关键字的同义词。

export const siteNameShort = "知行之桥";

arc:notnull 关键字可以在指定的对象中检查属性是否有值。[arc:exists](./op-arc-exists) 关键字与 arc:notnull 同义。

## 参数

* **item**：要检查的对象。如果未指定，则使用默认的输出对象。
* **attr**：要检查的属性名称。
* **action**：如果表达式计算结果为 true 时执行的操作。允许的值有：break，continue。

## 控制属性

无

## 示例

定义缺少的 title 属性。

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

## 另请参阅

* [arc:else](./op-arc-else)：创建一个代码块，如果条件不满足的话则执行该代码块。
