الفرق بين المراجعتين لصفحة: «قالب:0»

من موسوعة العلوم العربية
اذهب إلى التنقل اذهب إلى البحث
ط (مراجعة واحدة)
 
(لا فرق)

المراجعة الحالية بتاريخ 10:33، 21 أغسطس 2012

Inserts a visibility:hidden and color:transparent (i.e. invisible) zero (0) character. It is used for padding statistics and other numbers in table columns so that they line up properly.

The invisible zero may in fact be replaced by any other string (which regardless, is made invisible), by specifying the string as the first optional parameter. This is useful to "visually pad out" equivalent length rows in numeric columns in such tables. This is accomplished by inserting extra invisible zeroes, thousands separators, or decimal points prefixing and suffixing the numeric field, (adjusted to pad to the length of the largest numeric value) like in example one.

Example-1: Shows {{قالب:0}} padding fields align decimal points in edit mode as well as what will be displayed) of varying length column row data...

{{0|0,000,0}}12{{0|.00}} km<br />
{{0|0,000,0}}24.{{0|00}} km<br />
{{0|0,000,}}212.5{{0|0}} km<br />
{{0|0,00}}3,212.51 km<br />
and...
{{0|00,0}}12{{0|.00}} km<br />
{{0|00,0}}24.{{0|00}} km<br />
{{0|00,}}212.5{{0|0}} km<br />
{{0|0}}3,212.51 km<br />
{{0|}}6,789.01 km<br />

which gives:

0,000,012.00 km
0,000,024.00 km
0,000,212.50 km
0,003,212.51 km

and...

00,012.00 km
00,024.00 km
00,212.50 km
03,212.51 km
6,789.01 km ↔ note the effect... of 'zero length' or null string in padding prefix. (Compare and contrast with way "3,212.51 mi" is commanded and then expressed below in example-two.)


example-2; Numbers columnized with Zero left padding of largest:

note
From the difference in the prefix calls (compare above and below example calls)... only the number of places consumed matters in the spacing that results. خطأ: لا توجد وحدة بهذا الاسم "Indent".In short, the template cares not whether you specify comma, decimal points, or zero's:
{{0|0,0}}12{{0|.00}} mi<br />
{{0|0,0}}24.{{0|00}} mi<br />
{{0|,0}}212.5{{0|0}} mi<br />
3,212.51 mi<br />
{{0|}}6,789.01 mi<br/>

which shows the usefulness of the null argument for aligning the column in edit mode

Giving...

0,012.00 mi
0,024.00 mi
,0212.50 mi
3,212.51 mi
6,789.01 mi

These hidden characters are part of the string used for collation when sorting tables, even though they are not visible (but they still take space and numeric columns are correctly aligned as if they were present.

cs:Šablona:0/doc en:Template:0/doc

af:Sjabloon:0 als:Vorlage:0 arz:قالب:0 be:Шаблон:0 bg:Шаблон:0 bn:টেমপ্লেট:0 ca:Plantilla:0 cs:Šablona:0/doc cv:Шаблон:0 da:Skabelon:0 de:Vorlage:0 el:Πρότυπο:0 en:Template:0 fi:Malline:0 fr:Modèle:0 hr:Predložak:0 hsb:Předłoha:0 hu:Sablon:0 it:Template:0- ja:Template:0 jv:Cithakan:0 ka:თარგი:0 kab:Talɣa:0 ko:틀:0 mk:Шаблон:0 mn:Загвар:0 mr:साचा:० mt:Mudell:0 my:Template:0 nl:Sjabloon:0 or:ଛାଞ୍ଚ:0 os:Шаблон:0 pl:Szablon:0 pt:Predefinição:0 ru:Шаблон:0 sh:Šablon:0 simple:Template:0 sr:Шаблон:0 su:Citakan:0/doc th:แม่แบบ:0 zh:Template:0