Module:Boolean/doc
This is the documentation page for Module:Boolean
Allows for boolean operations not easily compatible with {{#ifexpr:...}}
.
Usage[edit source]
{{#invoke:Boolean|operator|value1|value2|n=number_of_expected_parameters|true=result_if_condition_is_true|false=result_if_condition_is_false}}
(remove value2 for negation operations)
For AND, prints the value of "true" if both the first and second parameters are filled, prints the parameter of "false" or nothing otherwise.
For OR, prints the value of "true" if the first or second parameters are filled, prints the parameter of "false" or nothing otherwise.
For NOT, prints the value of "true" if the first parameter is empty, prints the parameter of "false" or nothing otherwise.
For XOR, prints the value of "true" if either the first or the second parameters are filled (but not both), prints the parameter of "false" or nothing otherwise.
For NAND, NOR, and XNOR, prints the value of "true" if the AND, OR, or XOR condition is not satisfied, prints the parameter of "false" or nothing otherwise.
Examples[edit source]
AND[edit source]
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
OR[edit source]
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
NOT[edit source]
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
XOR[edit source]
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
NAND[edit source]
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
NOR[edit source]
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
XNOR[edit source]
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.
- Lua error in package.lua at line 80: module 'Module:Yesno' not found.