Jump to content

Template:Truth table auto: Difference between revisions

From Logic World Wiki
Created page with "<includeonly>{{#invoke:LogicUtils|truth_table_auto}}</includeonly>"
 
add templatedata
Line 1: Line 1:
<noinclude>
<templatedata>
{
"params": {
"caption": {
"description": "Title to show above the table",
"type": "line"
},
"inputs": {
"description": "Number of inputs or list of input names",
"example": "\"3\", \"A B C\"",
"type": "line",
"required": true
},
"outputs": {
"description": "Number of outputs or list of output names",
"example": "\"2\", \"X Y\"",
"type": "line",
"required": true
},
"expr1": {
"description": "Expression for output #1 in reverse polish notation",
"example": "a b & c |",
"type": "line"
},
"expr2": {
"description": "Expression for output #2 in reverse polish notation",
"example": "a b & c |",
"type": "line"
},
"expr3": {
"description": "Expression for output #3 in reverse polish notation",
"example": "a b & c |",
"type": "line"
},
"expr4": {
"description": "Expression for output #4 in reverse polish notation",
"example": "a b & c |",
"type": "line"
},
"expr5": {
"description": "Expression for output #5 in reverse polish notation",
"example": "a b & c |",
"type": "line"
},
"expr6": {
"description": "Expression for output #6 in reverse polish notation",
"example": "a b & c |",
"type": "line"
}
},
"description": "Renders a truth table with any number of inputs and outputs",
"paramOrder": [
"caption",
"inputs",
"outputs",
"expr1",
"expr2",
"expr3",
"expr4",
"expr5",
"expr6"
],
"format": "block"
}
</templatedata>
</noinclude>
<includeonly>{{#invoke:LogicUtils|truth_table_auto}}</includeonly>
<includeonly>{{#invoke:LogicUtils|truth_table_auto}}</includeonly>

Revision as of 15:39, 8 September 2025

Renders a truth table with any number of inputs and outputs

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
captioncaption

Title to show above the table

Lineoptional
inputsinputs

Number of inputs or list of input names

Example
"3", "A B C"
Linerequired
outputsoutputs

Number of outputs or list of output names

Example
"2", "X Y"
Linerequired
expr1expr1

Expression for output #1 in reverse polish notation

Example
a b & c |
Lineoptional
expr2expr2

Expression for output #2 in reverse polish notation

Example
a b & c |
Lineoptional
expr3expr3

Expression for output #3 in reverse polish notation

Example
a b & c |
Lineoptional
expr4expr4

Expression for output #4 in reverse polish notation

Example
a b & c |
Lineoptional
expr5expr5

Expression for output #5 in reverse polish notation

Example
a b & c |
Lineoptional
expr6expr6

Expression for output #6 in reverse polish notation

Example
a b & c |
Lineoptional