Test /
ConditionTest
testing conditional expressions
I'm trying to write a condition that says:
if ( [ A does not equal a ] AND [ B does not equal b ] ) OR ( [ C does not equal c ] AND [ D does not equal d ] )
Here's the markup I'm using:
(:A:a:) {$:A}
(:B:b:) {$:B}
(:C:c:) {$:C}
(:D:d:) {$:D}
|
a b c d |
(:if ( [ ! equal {$:A} z ] && [ ! equal {$:B} z ] ) || ( [ ! equal {$:C} z ] && [ ! equal {$:D} z ] ) :)
CONTENT
(:ifend:)
|
(:if ! equal {$:A} z :)
A ≠ z
(:ifend:)
|
A ≠ z |
(:if [! equal {$:A} z] :)
A ≠ z
(:ifend:)
|
A ≠ z |
(:if ( [! equal {$:A} z] && [ ! equal {$:B} z ] ) :)
A ≠ z and B ≠ z
(:ifend:)
|
(:if ! (group nosuchgroup AND false) :) "! (expression)" works (:ifend:) |
"! (expression)" works |
(:winter:(false OR date 2013-06-01..2013-11-14):)
{$:winter}
|
(false OR date 2013-06-01..2013-11-14) |
(:if ! {$:winter}:)
It's summer
(:ifend:)
|
It's summer |
(:if {$:winter}:)
It's winter
(:ifend:)
|
It's winter |