Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Random: Difference between revisions

Template page
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude>{{#expr:{{#expr:{{CURRENTTIMESTAMP}} mod {{#expr:{{{2|50}}} - {{{1|0}}} + 1}}}} + {{{1|0}}}}}</onlyinclude>
<includeonly>{{Mod|(({{#time:U}}+({{{2|{{#time:z}}}}}))*({{{3|67}}})+({{NUMBEROFARTICLES:R}} mod ({{{3|67}}})))|{{{1|100}}}}}</includeonly><noinclude>
 
<!-- Please put all metadata in documentation page [[Template:Rand/doc]] -->
{{Random|1|2}}
Randomly generates a number from 0-X. By default X is one. The amount of values that can be generated can be chosen by typing <nowiki>{{Random|256}}</nowiki>. This makes it generate any value from 0-255. Notice 256 is not included in this generation. The value represents the number RANGE and includes 0. So 0-255 has 256 possible values.
0-255: {{Random|256}}<br>
0-3 but the number is replaced with words using switch statement: {{#switch:{{Random|3}}|0=Zero|1=One|2=Two|Three}}<br>
0-2 but the number is replaced with images using switch statement: [[File:{{#switch:{{Random|3}}|0=COM-15Icon.png|1=IconCom45.png|2=E11SRIcon.png}}|50px]]
</noinclude>

Latest revision as of 18:33, 14 June 2023

Randomly generates a number from 0-X. By default X is one. The amount of values that can be generated can be chosen by typing {{Random|256}}. This makes it generate any value from 0-255. Notice 256 is not included in this generation. The value represents the number RANGE and includes 0. So 0-255 has 256 possible values. 0-255: 223
0-3 but the number is replaced with words using switch statement: Zero
0-2 but the number is replaced with images using switch statement:

Cookies help us deliver our services. By using our services, you agree to our use of cookies.