Template:Random/doc: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
{{<includeonly>subst:</includeonly>#expr:{{random|1000}} + 25}} | {{<includeonly>subst:</includeonly>#expr:{{random|1000}} + 25}} | ||
{{subst:{{random| | {{subst:ns:{{#expr:2*{{random|10}}}} |
Revision as of 22:09, 23 April 2012
{{random}} generates a random number, at least to the extent that non-mathematicians will be happy with the term "random", through simple markup. The number can be from 1 to whatever number you choose, up to 1000.
Syntax is straightforward:
{{random|1000}} = 814
This number will change every time the page loads. If, however, you want to choose a random number that's "locked" in place by the act of hitting the publish button, then you have to substitute the template, like this:
<includeonly>subst:</includeonly>{{random|1000}}
=
839 {{subst:ns:8