Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes. edit
Thank you for your patience while we continue to upgrade DDOwiki to the latest MediaWiki LTS version. If you find any errors on the site, please visit the Discord chat server and let us know.
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 remove ads, build a reputation, and unlock more editing privileges and then visit DDO wiki's IRC Chat/Discord if you need any help!
Template:PosInt
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