summaryrefslogtreecommitdiffstats
path: root/doc/antora/modules/unlang/pages/condition/and.adoc
blob: 50b3deb2e02215acddae3a8d0d8bdfab2fdb0863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
= The && Operator

.Syntax
[source,unlang]
----
(condition-1 && condition-2)
----

The `&&` operator performs a short-circuit "and" evaluation of the
two conditions. This operator evaluates _condition-1_ and returns
`false` if _condition-1_ returns `false`. Only if _condition-1_
returns `true` is _condition-2_ evaluated and its result returned.

.Examples
[source,unlang]
----
if (&User-Name && &EAP-Message) { ...
----

// Copyright (C) 2020 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
// Development of this documentation was sponsored by Network RADIUS SAS.