Vorlage:booland/Doku
Aus RI Wiki
Zur Navigation springenZur Suche springen
Logische Und-Verknüpfung von zwei oder mehr Werten (nur für Vorlagenprogrammierung)
⧼templatedata-doc-params⧽
| ⧼templatedata-doc-param-name⧽ | ⧼templatedata-doc-param-desc⧽ | ⧼templatedata-doc-param-type⧽ | ⧼templatedata-doc-param-status⧽ | |
|---|---|---|---|---|
| 1. Wert | 1 | 1. Wert zur Verknüpfung | ⧼templatedata-doc-param-type-boolean⧽ | ⧼templatedata-doc-param-status-required⧽ |
| 2. Wert | 2 | 2. Wert zur Verknüpfung | ⧼templatedata-doc-param-type-boolean⧽ | ⧼templatedata-doc-param-status-required⧽ |
| weiterer Wert | 3 | Weiterer Wert zur Verknüpfung | ⧼templatedata-doc-param-type-boolean⧽ | ⧼templatedata-doc-param-status-optional⧽ |
| weitere Werte | 4 | Beliebig viele weitere Werte zur Verknüpfung | ⧼templatedata-doc-param-type-boolean⧽ | ⧼templatedata-doc-param-status-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.
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 |