| 1 |
= The || Operator |
| 2 |
|
| 3 |
.Syntax |
| 4 |
[source,unlang] |
| 5 |
---- |
| 6 |
(expression-1 || expression-2) |
| 7 |
---- |
| 8 |
|
| 9 |
The `||` operator performs a short-circuit "or" evaluation of the two |
| 10 |
expressions. This operator evaluates _condition-1_ and returns `true` |
| 11 |
if _condition-1_ returns true. Only if _condition-1_ returns `false` |
| 12 |
is _condition-2_ evaluated and its result returned. |
| 13 |
|
| 14 |
.Examples |
| 15 |
[source,unlang] |
| 16 |
---- |
| 17 |
if (&User-Name || &NAS-IP-Address) { ... |
| 18 |
---- |
| 19 |
|
| 20 |
// Copyright (C) 2020 Network RADIUS SAS. Licenced under CC-by-NC 4.0. |
| 21 |
// Development of this documentation was sponsored by Network RADIUS SAS. |