Difference between revisions of "Template:Compact begin code"

From Tripwire Interactive Wiki
Jump to: navigation, search
m
m
Line 7: Line 7:
 
for (i = 0; i < AdditionalWeapons.Length; i++)
 
for (i = 0; i < AdditionalWeapons.Length; i++)
 
WeaponList[WeaponList.Length] = AdditionalWeapons[i];
 
WeaponList[WeaponList.Length] = AdditionalWeapons[i];
{{End code}}</pre>
+
{{compact end code}}</pre>
  
 
'''Result:'''
 
'''Result:'''
Line 14: Line 14:
 
for (i = 0; i < AdditionalWeapons.Length; i++)
 
for (i = 0; i < AdditionalWeapons.Length; i++)
 
WeaponList[WeaponList.Length] = AdditionalWeapons[i];
 
WeaponList[WeaponList.Length] = AdditionalWeapons[i];
{{End code}}
+
{{compact end code}}
 
</noinclude>
 
</noinclude>

Revision as of 13:41, 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];