Difference between revisions of "Template:MC-Basic/PredefinedConstant"

From SoftMC-Wiki
Jump to: navigation, search
m (Draft)
 
(added description)
Line 11: Line 11:
 
{{Template
 
{{Template
 
|description=
 
|description=
 +
Predefined constant entry within the [[Template:MC-Basic/PredefinedConstantHeader|<nowiki>{{MC-Basic/PredefinedConstantHeader}}</nowiki>]] template.
  
 
|template=
 
|template=
 
<nowiki>
 
<nowiki>
{{MC-Basic/ErrorCode|date|topic|link}}
+
{{MC-Basic/PredefinedConstantHeader|name|value|usage|example}}
 
</nowiki>
 
</nowiki>
  
 
|parameters=
 
|parameters=
;date
+
;name
: News date.
+
: Constant name.
;topic
+
;value
: Brief description of the news.
+
: Constant value.
;link
+
;usage
: Link to further information.
+
: Usage description.
 +
;example
 +
: Examples.
  
 
|operation=
 
|operation=
 +
The constant name is automatically anchored.
 +
A reference to a constant within the page can be done with [[#False]].
 +
 
|examples=
 
|examples=
 +
;Input
 
<pre>
 
<pre>
{{Software/NewsHeader|October 2010|
+
{{MC-Basic/PredefinedConstantHeader|
{{Software/News|2010-10-04|aico.control 1.5.0 released|[[/1.5.0|aico.control 1.5.0 release page]]}}
+
{{MC-Basic/PredefinedConstant|True|1|Absolute property (axis and group) Simulated property (axis)|A1.Absolute <nowiki>=</nowiki> True}}
{{Software/News|2010-10-12|next news topic|[[link]]}}
+
{{MC-Basic/PredefinedConstant|False|0|Absolute property (axis and group) Simulated property (axis)|A1.Absolute <nowiki>=</nowiki> False}}
 +
{{MC-Basic/PredefinedConstant|PI|3.14159265359|In expressions; to convert from Radians to degrees|Deg <nowiki>=</nowiki> Rad *180 / PI}}
 
}}
 
}}
 
</pre>
 
</pre>
 +
;Output
 +
{{MC-Basic/PredefinedConstantHeader|
 +
{{MC-Basic/PredefinedConstant|True|1|Absolute property (axis and group) Simulated property (axis)|A1.Absolute <nowiki>=</nowiki> True}}
 +
{{MC-Basic/PredefinedConstant|False|0|Absolute property (axis and group) Simulated property (axis)|A1.Absolute <nowiki>=</nowiki> False}}
 +
{{MC-Basic/PredefinedConstant|PI|3.14159265359|In expressions; to convert from Radians to degrees|Deg <nowiki>=</nowiki> Rad *180 / PI}}
 +
}}
 +
 
}}
 
}}
  
 
[[Category:Template:MC-Basic]]
 
[[Category:Template:MC-Basic]]
 
</noinclude>
 
</noinclude>

Revision as of 09:59, 14 December 2010

Predefined constant entry within the {{MC-Basic/PredefinedConstantHeader}} template.

Template

{{MC-Basic/PredefinedConstantHeader|name|value|usage|example}}

Parameters

name
Constant name.
value
Constant value.
usage
Usage description.
example
Examples.

Operation

The constant name is automatically anchored. A reference to a constant within the page can be done with #False.

Examples

Input
{{MC-Basic/PredefinedConstantHeader|
{{MC-Basic/PredefinedConstant|True|1|Absolute property (axis and group) Simulated property (axis)|A1.Absolute = True}}
{{MC-Basic/PredefinedConstant|False|0|Absolute property (axis and group) Simulated property (axis)|A1.Absolute = False}}
{{MC-Basic/PredefinedConstant|PI|3.14159265359|In expressions; to convert from Radians to degrees|Deg = Rad *180 / PI}}
}}
Output
Reserved Name Value Usage Example
True 1 Absolute property (axis and group) Simulated property (axis) A1.Absolute = True
False 0 Absolute property (axis and group) Simulated property (axis) A1.Absolute = False
PI 3.14159265359 In expressions; to convert from Radians to degrees Deg = Rad *180 / PI

For more examples refer to pages, which use this template: What links here.

Help:Templates describes general usage of templates, including treatment of special characters.