Vorlage:booland
Zur Navigation springen
Zur Suche springen
Logische Und-Verknüpfung von zwei oder mehr Werten (nur für Vorlagenprogrammierung)
Vorlagenparameter
| Parameter | Beschreibung | Typ | Status | |
|---|---|---|---|---|
| 1. Wert | 1 | 1. Wert zur Verknüpfung | Wahrheitswert | erforderlich |
| 2. Wert | 2 | 2. Wert zur Verknüpfung | Wahrheitswert | erforderlich |
| weiterer Wert | 3 | Weiterer Wert zur Verknüpfung | Wahrheitswert | optional |
| weitere Werte | 4 | Beliebig viele weitere Werte zur Verknüpfung | Wahrheitswert | optional |
Kopiervorlage
{{booland| | }}
{{booland| | | }}
{{booland| | | | }}
{{booland| | | | | }}
{{booland| | | | | | }}
Hinweise
Im Unterschied zur Wikisyntax werden nicht nur leere Strings als „false“ betrachtet, sondern auch solche, welche 0, - oder false enthalten.
Die Vorlage erzeugt einen nichtleeren String (1, also „wahr“), wenn alle Parameter nach vorstehender Regel „wahr“ sind, ansonsten einen leeren String.
Ein leerer Parameter, also auch etwa
|}}, bewirkt stets ein logisches „falsch“.Beispiele
{{#if: {{booland|| }} | Ja | Nein}}ergibt
Nein
{{#if: {{booland|xxx| }} | Ja | Nein}}ergibt
Nein
{{#if: {{booland| |yyy}} | Ja | Nein}}ergibt
Nein
{{#if: {{booland|xxx|yyy}} | Ja | Nein}}ergibt
Ja
{{#if: {{booland|xxx|yyy| }} | Ja | Nein}}ergibt
Nein
{{#if: {{booland|xxx|yyy|}} | Ja | Nein}}ergibt
Nein
Wahrheitstabellen
| Eingabe | Ausgabe |
|---|---|
| {{booland| | }} | |
| {{booland| |1}} | |
| {{booland|1| }} | |
| {{booland|1|1}} | 1 |
| Eingabe | Ausgabe |
|---|---|
| {{booland| | | }} | |
| {{booland| |1| }} | |
| {{booland|1| | }} | |
| {{booland|1|1| }} | |
| {{booland| | |1}} | |
| {{booland| |1|1}} | |
| {{booland|1| |1}} | |
| {{booland|1|1|1}} | 1 |
| Eingabe | Ausgabe |
|---|---|
| {{booland| | | | }} | |
| {{booland| |1| | }} | |
| {{booland|1| | | }} | |
| {{booland|1|1| | }} | |
| {{booland| | |1| }} | |
| {{booland| |1|1| }} | |
| {{booland|1| |1| }} | |
| {{booland|1|1|1| }} | |
| {{booland| | | |1}} | |
| {{booland| |1| |1}} | |
| {{booland|1| | |1}} | |
| {{booland|1|1| |1}} | |
| {{booland| | |1|1}} | |
| {{booland| |1|1|1}} | |
| {{booland|1| |1|1}} | |
| {{booland|1|1|1|1}} | 1 |
Siehe auch
Lua
Verwendetes Modul: Expr #TemplateBooland