Difference between revisions of "User:Trang Oul/Sandbox/Template:Range"
< User:Trang Oul | Sandbox
Jump to navigation
Jump to search
| Line 31: | Line 31: | ||
* -0 s: {{User:Trang Oul/Sandbox/Template:Range||-1|0|signed=1}} | * -0 s: {{User:Trang Oul/Sandbox/Template:Range||-1|0|signed=1}} | ||
* -- s {{User:Trang Oul/Sandbox/Template:Range||-2|-1|signed=1}} | * -- s {{User:Trang Oul/Sandbox/Template:Range||-2|-1|signed=1}} | ||
| − | </noinclude><includeonly>{{#ifexpr: | + | </noinclude><includeonly>{{#ifexpr: 0{{{1|0}}} != 0 |
| − | | {{#ifexpr: {{{signed|0}}} | {{User:Trang Oul/Sandbox/Template:Signed number|{{{1}}}|signed=1}} | {{{1}}} }} | + | | {{#ifexpr: {{{signed|0}}} |
| + | | {{User:Trang Oul/Sandbox/Template:Signed number|{{{1}}}|signed=1}} | ||
| + | | {{{1}}} | ||
| + | }} | ||
| {{#ifexpr: {{{2}}} = {{{3}}} | | {{#ifexpr: {{{2}}} = {{{3}}} | ||
| − | | {{#ifexpr: {{{signed|0}}} | {{User:Trang Oul/Sandbox/Template:Signed number|{{{2}}}|signed=1}} | {{{2}}} }} | + | | {{#ifexpr: {{{signed|0}}} |
| + | | {{User:Trang Oul/Sandbox/Template:Signed number|{{{2}}}|signed=1}} | ||
| + | | {{{2}}} | ||
| + | }} | ||
| {{#ifexpr: {{{signed|0}}} | | {{#ifexpr: {{{signed|0}}} | ||
| {{User:Trang Oul/Sandbox/Template:Range/Signed|{{{2}}}|{{{3}}}}} | | {{User:Trang Oul/Sandbox/Template:Range/Signed|{{{2}}}|{{{3}}}}} | ||
Revision as of 15:36, 3 November 2026
Usage: {{Range|[value]|[min]|[max]|[signed=0]}}
Examples:
value param:
- + us: 1
- 0 us: Expression error: Unexpected = operator.
- us: -1
min and max params, equal:
- + us: 1
- 0 us: 0
- us: -1
- + s: +1
- 0 s: 0
- s: -1
- ++ us: (1-2)
- 0+ us: Expression error: Unexpected = operator.
- -+ us: -1
- -0 us: ((-1)-0)
- -- us ((-2)-(-1))
- ++ s: +(1-2)
- 0+ s: +(0-2)
- -+ s: ((-1)-(+2))
- -0 s: -(0-1)
- -- s -(1-2)