kopia lustrzana https://github.com/alecmuffett/eotk
commit: conditionals docs
rodzic
b7aac63c9a
commit
42b3caaba9
|
@ -238,7 +238,7 @@ eg: `%%IF %ONION% eq facebookcorewwwi`
|
|||
* `contains`
|
||||
* `!contains`
|
||||
|
||||
Logic Operators
|
||||
### Logic Operators
|
||||
|
||||
eg: `%%IF %BOOL1% and %BOOL2%` - no subexpressions, sorry
|
||||
|
||||
|
@ -246,6 +246,26 @@ eg: `%%IF %BOOL1% and %BOOL2%` - no subexpressions, sorry
|
|||
* `or`
|
||||
* `xor`
|
||||
|
||||
Also, simple conditionals (*not* expressions) may use `!` or `not` to
|
||||
invert the sense of an if-statement, so this is valid
|
||||
|
||||
```
|
||||
%%IF not %VALID%
|
||||
Where VALID is boolean-evaluatable like 0 or 1
|
||||
...
|
||||
%%ENDIF
|
||||
```
|
||||
|
||||
...but this is *not valid*
|
||||
|
||||
```
|
||||
%%IF ! %FOO% eq BAR
|
||||
*THIS WILL NOT WORK AS INTENDED*
|
||||
*YOU WANT: %FOO% ne BAR*
|
||||
...
|
||||
%%ENDIF
|
||||
```
|
||||
|
||||
### Operator Notes
|
||||
|
||||
If you are at risk of empty strings for string comparisons,
|
||||
|
|
Ładowanie…
Reference in New Issue