2023-07-01 11:58:00 -04:00
|
|
|
switch .x, .y, .z {
|
|
|
|
|
case true: ...
|
|
|
|
|
# any are true
|
|
|
|
|
case false, _: ...
|
|
|
|
|
# .x == false
|
|
|
|
|
case _, null, true: ...
|
|
|
|
|
# .y == null or .z == true
|
|
|
|
|
case xor _, true, true: ...
|
|
|
|
|
# .y == true xor .z == true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch 0 {
|
|
|
|
|
case .x, .y: ...
|
|
|
|
|
# .x or .y equals 0
|
|
|
|
|
...
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-06 22:25:12 -08:00
|
|
|
switch[and] .x, .y, .z {
|
2023-07-01 11:58:00 -04:00
|
|
|
case true: ...
|
|
|
|
|
# all are true
|
|
|
|
|
case false, _: ...
|
|
|
|
|
# .x == false
|
|
|
|
|
case _, null, true: ...
|
|
|
|
|
# .y == null and .z == true
|
|
|
|
|
}
|