---
name: "ZT_CMP_RUNE"
section: "3"
platform: "linux"
package: "libzt-doc"
version: "0.3.1-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ZT_CMP_RUNE"
---

# ZT\_CMP\_RUNE(3)

construct a claim of a relation between two characters (runes)

## NAME

**ZT\_CMP\_RUNE**, **zt\_cmp\_rune** – construct a claim of a relation between two characters (runes)

## SYNOPSIS

**#include \<zt.h\>**

```
#define ZT_CMP_RUNE(left, rel, right) \
  zt_cmp_rune( \
    ZT_CURRENT_LOCATION(), \
    zt_pack_rune((left), (#left)), \
    zt_pack_string((#rel), (#rel)), \
    zt_pack_rune((right), (#right)))
```

*zt\_claim*\

**zt\_cmp\_rune**(*zt\_location location*, *zt\_value left*, *zt\_value rel*, *zt\_value right*);

## DESCRIPTION

**zt\_cmp\_rune**() constructs a claim of a relation between two unsigned integers. It should be used through the macro **ZT\_CMP\_RUNE**() which passes source code location and packs arguments.

The relation must be one of *==*, *!=*, *\<*, *\<=*, *\>* or *\>=*.

## IMPLEMENTATION NOTES

**ZT\_CMP\_RUNE**() evaluates *left* and *right* exactly once.

## RETURN VALUES

Both the macro and the function return a claim structure with the right attributes set. The returned claim is usually passed to **zt\_check**() or to **zt\_assert**().

## SEE ALSO

[ZT\_CMP\_BOOL(3)](/ZT_CMP_BOOL/3.md), [ZT\_CMP\_RUNE(3)](/ZT_CMP_RUNE/3.md), ZT\_CMP\_CSTR(3), [ZT\_CMP\_PTR(3)](/ZT_CMP_PTR/3.md), [ZT\_CMP\_UINT(3)](/ZT_CMP_UINT/3.md), [ZT\_FALSE(3)](/ZT_FALSE/3.md), [ZT\_NOT\_NULL(3)](/ZT_NOT_NULL/3.md), [ZT\_NULL(3)](/ZT_NULL/3.md), [ZT\_TRUE(3)](/ZT_TRUE/3.md), [zt\_check(3)](/zt_check/3.md),

## HISTORY

The **ZT\_CMP\_RUNE**() macro and the **zt\_cmp\_rune**() function first appeared in libzt 0.1

## AUTHORS

Zygmunt Krynicki ⟨*me@zygoon.pl*⟩
