Template:Compact begin code: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly><div id="{{{id}}}" style="margin:20px;border: 1px dashed #2f6fab;font-family: Courier New;font-size:1em;white-space:pre-wrap;word-wrap:break-word;tab-size: 4;"><d...") |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div id="{{{id}}}" style="margin:20px;border: 1px dashed #2f6fab;font-family: Courier New;font-size:1em;white-space:pre-wrap;word-wrap:break-word;tab-size: 4; | <includeonly><div id="{{{id}}}" style="margin:20px;border: 1px dashed #2f6fab;font-family: Courier New;font-size:1em;white-space:pre-wrap;word-wrap:break-word;tab-size: 4;padding:0px 20px 0px 20px;background-color:white;"></includeonly><noinclude>==Description== | ||
Provides a maximum-width code box with line wrap and a tab size of 4. | Provides a maximum-width code box with line wrap and a tab size of 4. | ||
== Usage == | == Usage == | ||
<pre>{{Compact begin code}} | <pre>{{Compact begin code}}for (i = 0; i < AdditionalWeapons.Length; i++) | ||
for (i = 0; i < AdditionalWeapons.Length; i++) | WeaponList[WeaponList.Length] = AdditionalWeapons[i];{{compact end code}}</pre> | ||
WeaponList[WeaponList.Length] = AdditionalWeapons[i]; | |||
{{ | |||
'''Result:''' | '''Result:''' | ||
{{Compact begin code}} | {{Compact begin code}}for (i = 0; i < AdditionalWeapons.Length; i++) | ||
for (i = 0; i < AdditionalWeapons.Length; i++) | WeaponList[WeaponList.Length] = AdditionalWeapons[i];{{compact end code}} | ||
WeaponList[WeaponList.Length] = AdditionalWeapons[i]; | |||
{{ | |||
</noinclude> | </noinclude> |
Latest revision as of 13:43, 18 December 2012
Description
Provides a maximum-width code box with line wrap and a tab size of 4.
Usage
{{Compact begin code}}for (i = 0; i < AdditionalWeapons.Length; i++) WeaponList[WeaponList.Length] = AdditionalWeapons[i];{{compact end code}}
Result:
for (i = 0; i < AdditionalWeapons.Length; i++)
WeaponList[WeaponList.Length] = AdditionalWeapons[i];