Debian Codegraph @

doc/antora/modules/unlang/pages/condition/operands.adoc

raw
1 = Operands
2
3 .Syntax
4 [source,unlang]
5 ----
6 string
7 integer
8 "double-quoted string"
9 'single-quoted string'
10 `back-quoted string`
11 ----
12
13 Any text not matching xref:attr.adoc[&Attribute-Name] or
14 xref:condition/return_codes.adoc[Return Code] is interpreted as a value for a
15 particular xref:type/index.adoc[data type].
16
17 Double-quoted strings and back-quoted strings are dynamically expanded
18 before the condition is evaluated. Single-quoted strings are static
19 literals and are not dynamically expanded.
20
21 When used as an existence check, the condition evaluates to `true` if
22 the data is non-zero. Otherwise, the condition evaluates to `false`.
23
24 For integer existence checks, `0` is `false`; all other values are `true`.
25
26 For string existence checks, an empty string is `false`. All other
27 strings are `true`.
28
29 All other data types are disallowed in existence checks.
30
31 .Examples
32
33 `"hello there"` +
34 `5`
35
36 // Copyright (C) 2020 Network RADIUS SAS. Licenced under CC-by-NC 4.0.
37 // Development of this documentation was sponsored by Network RADIUS SAS.