Difference between revisions of "Template:Current"

From railML 2 Wiki
Jump to: navigation, search
[checked revision][checked revision]
(Example)
Line 1: Line 1:
2.4<noinclude>
+
{{#switch:{{{1}}}
 +
|3.1=3.1
 +
|#default=2.4}}2.4<noinclude>
 
==Application==
 
==Application==
 
This template serves as a variable bearing the current version number. The version number is a string, not a figure. Therefore it can be displayes as text and analysed for equality, but it cannot be compared for size.
 
This template serves as a variable bearing the current version number. The version number is a string, not a figure. Therefore it can be displayes as text and analysed for equality, but it cannot be compared for size.
  
 
The value should be adapted, whenever a new version of {{rml}} is published. Please, check in this case, if [[Template:Version]] still functions propperly!
 
The value should be adapted, whenever a new version of {{rml}} is published. Please, check in this case, if [[Template:Version]] still functions propperly!
 +
 +
As currently (as of April 2019) both version 2.4 and 3.1 are current, there is an optional unnamed argument to replace the default 2.4 with 3.1.
 
===Dependencies===
 
===Dependencies===
 
This template does not depend on any other templates. It supports [[Template:Version]].
 
This template does not depend on any other templates. It supports [[Template:Version]].
Line 16: Line 20:
  
 
The current {{rml}} version is {{current}}
 
The current {{rml}} version is {{current}}
 +
 +
<pre>The current {{rml}} version is {{current|3.1}}</pre>
 +
delivers
 +
 +
The current {{rml}} version is {{current|3.1}}
 
[[Category:Template]]</noinclude>
 
[[Category:Template]]</noinclude>

Revision as of 09:35, 2 April 2019

2.42.4

Application

This template serves as a variable bearing the current version number. The version number is a string, not a figure. Therefore it can be displayes as text and analysed for equality, but it cannot be compared for size.

The value should be adapted, whenever a new version of railML® is published. Please, check in this case, if Template:Version still functions propperly!

As currently (as of April 2019) both version 2.4 and 3.1 are current, there is an optional unnamed argument to replace the default 2.4 with 3.1.

Dependencies

This template does not depend on any other templates. It supports Template:Version.

Example

This template is mainly intended to support Template:Version.

Alternatively it can be employed to display the current version number:

The current {{rml}} version is {{current}}

delivers

The current railML® version is 2.4

The current {{rml}} version is {{current|3.1}}

delivers

The current railML® version is 3.1