Year of the Dragon: Through March 26th, claim Dragon Lord for free! Speak to Xatheral in the Hall of Heroes.
Game mechanics • Newbie guide • In development • DDO Store • Social Media
Challenges • Classes • Collectables • Crafting • Enhancements • Epic Destinies • Favor • Feats
Glossary • Items • Maps • Monsters • Places • Quests • Races • Reincarnation • Skills • Spells
Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!
Template:PosInt
Jump to navigation
Jump to search
Usage[edit]
{{IfPositiveInteger | 1 = | 2 = | 3 = }} <!-- end if PosInt -->
- 1 test value. Can be anything.
- 2 text to be generated if value is a positive integer. If this parameter is not given and the test value is a positive integer or 0, the test value will be the result.
- 3 text to be generated if value is not a positive integer. If this parameter is not given, nothing will be generated in case the test value is not a positive integer or 0.
Examples[edit]
- Note that the test value doesn't need to be given as "1=123".
|2=
and|3=
are not given. {{ Tl | IfPositiveInteger | Test value }}
{{ IfPositiveInteger | Test value }}
{{ IfPositiveInteger | Test value | true }}
{{ IfPositiveInteger | Test value | | false }}
{{ IfPositiveInteger | Test value | true | false }}
{{ IfPositiveInteger | -1 }}
- false
- false
{{ IfPositiveInteger | 0 }}
- 0
- true
- true
{{ IfPositiveInteger | 1 }}
- 1
- true
- true
{{ IfPositiveInteger | -1.1 }}
- false
- false
{{ IfPositiveInteger | 1.1 }}
- false
- false
{{ IfPositiveInteger | I }}
- false
- false