Lou Montana/Sandbox/Template:Function – User
< User:Lou Montana | Sandbox
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Page creation) |
Lou Montana (talk | contribs) (Adjusted to match the future new Command template) |
||
Line 1: | Line 1: | ||
<includeonly>__NOTOC__ __NOEDITSECTION__ {{DISPLAYTITLE:{{PAGENAMEE}}}} {{DEFAULTSORT:{{uc:{{PAGENAME}}}}}}<div class="_description fnc"><!-- | <includeonly><!-- | ||
-->{{GVI|{{{1}}}|{{{2}}}|categorize}}<!-- | -->__NOTOC__<!-- | ||
-->{{#if:{{{game2|}}}|{{GVI|{{{game2}}}|{{{version2}}}|categorize}}|}}<!-- | -->__NOEDITSECTION__<!-- | ||
-->{{#if:{{{game3|}}}|{{GVI|{{{game3}}}|{{{version3}}}|categorize}}|}}<!-- | -->{{DISPLAYTITLE:{{PAGENAMEE}}}}<!-- | ||
-->{{#if:{{{game4|}}}|{{GVI|{{{game4}}}|{{{version4}}}|categorize}}|}}<!-- | -->{{DEFAULTSORT:{{uc:{{PAGENAME}}}}}}<!-- | ||
-->{{#if:{{{game5|}}}|{{GVI|{{{game5}}}|{{{version5}}}|categorize}}|}}<!-- | -->[[Category:{{Name|{{{game|{{{game1|{{{1}}}}}}}}}}}: New Functions List|{{uc:{{PAGENAME}}}}]]<!-- Automatically includes page in "New Scripting Commands List" category | ||
-->{{#ifeq: {{Name|{{{game|{{{game1|{{{1}}}}}}}}}}} | {{Name|arma3dev}} | [[Category:Introduced with Arma 3 Development Branch]] | }}<!-- Includes every arma 3 dev function in one category as well as reg version subcategories | |||
// TODO: split BIS_fnc_ / BIN_fnc_ ? | |||
[[Category:Functions|{{uc:romanNumeral}}]] | |||
[[Category:{{Name|{{{game|{{{game1|{{{1}}}}}}}}}}}: Functions|{{uc:romanNumeral}}]] | |||
--><div class="_description fnc"><!-- | |||
-->{{GVI|{{{game|{{{game1|{{{1}}}}}}}}}|{{{version|{{{version1|{{{2|1.00}}}}}}}}}|categorize}}<!-- | |||
-->{{#if:{{{game2|}}}|{{GVI|{{{game2}}}|{{{version2|1.00}}}|categorize}}|}}<!-- | |||
-->{{#if:{{{game3|}}}|{{GVI|{{{game3}}}|{{{version3|1.00}}}|categorize}}|}}<!-- | |||
-->{{#if:{{{game4|}}}|{{GVI|{{{game4}}}|{{{version4|1.00}}}|categorize}}|}}<!-- | |||
-->{{#if:{{{game5|}}}|{{GVI|{{{game5}}}|{{{version5|1.00}}}|categorize}}|}}<!-- | |||
-->{{#if:{{{arg|{{{eff|}}}}}}|<span style="margin-left: 1em">|}}<!-- space between game versions and arguments/effects | |||
-->{{#if:{{{arg|}}}|{{EffArg|fnc|arg|{{{arg}}}|categorize}}|}}<!-- | -->{{#if:{{{arg|}}}|{{EffArg|fnc|arg|{{{arg}}}|categorize}}|}}<!-- | ||
-->{{#if:{{{eff|}}}|{{EffArg|fnc|eff|{{{eff}}}|categorize}}|}}<!-- | -->{{#if:{{{eff|}}}|{{EffArg|fnc|eff|{{{eff}}}|categorize}}|}}<!-- | ||
--> | -->{{#if:{{{arg|{{{eff|}}}}}}|</span>|}}<!-- | ||
--><div style="font-size: 0.9em"><!-- | |||
< | -->[[:Category:{{Name|{{{game|{{{game1|{{{1}}}}}}}}}}}: New Scripting Commands List|Introduced in '''{{Name|{{{game|{{{game1|{{{1}}}}}}}}}}}''']] <!-- | ||
-->[[:Category:Introduced with {{Name|{{{game|{{{game1|{{{1}}}}}}}}}}} version {{{version|{{{2|1.00}}}}}}|version '''{{{version|{{{2|1.00}}}}}}''']]<!-- | |||
--></div> | |||
<div style="color:grey; font-size:0.75em">Click on the images for descriptions</div> | |||
</ | |||
<h3>Description</h3> | <h3>Description</h3> | ||
<dl> | <dl> | ||
<dt>Description:</dt> | <dt>Description:</dt> | ||
<dd>{{{3|}}}</dd> | <dd>{{{description|{{{3|}}}}}}</dd> | ||
</dl><!-- | </dl><!-- | ||
-->{{#if:{{{ | -->{{#if:{{{mp|}}}| | ||
<dt>Multiplayer:</dt> | |||
<dd>{{{mp}}}</dd>|}}<!-- | |||
-->{{#if:{{{pr|}}}| | |||
<dt>Problems:</dt> | |||
<dd>{{{pr}}}</dd>|}}<!-- | |||
--><h3>Syntax</h3> | |||
<dl> | <dl> | ||
<dt>Syntax:</dt> | <dt>Syntax:</dt> | ||
<dd>{{{4}}}</dd> | <dd>{{{s1|{{{4|'''{{PAGENAMEE}}'''}}}}}}</dd><!-- | ||
-->{{#if:{{{p1|}}}| | -->{{#if:{{{p1|}}}| | ||
{{Command-param|{{{p1}}}| | {{Command-param|{{{p1}}}|Parameters:}} | ||
{{#if:{{{p2|}}}|{{Command-param|{{{p2}}} | {{#if:{{{p2|}}}| {{Command-param| {{{p2}}}}} | ||
{{#if:{{{p3|}}}|{{Command-param|{{{p3}}} | {{#if:{{{p3|}}}| {{Command-param| {{{p3}}}}} | ||
{{#if:{{{p4|}}}|{{Command-param|{{{p4}}} | {{#if:{{{p4|}}}| {{Command-param| {{{p4}}}}} | ||
{{#if:{{{p5|}}}|{{Command-param|{{{p5}}} | {{#if:{{{p5|}}}| {{Command-param| {{{p5}}}}} | ||
{{#if:{{{p6|}}}|{{Command-param|{{{p6}}} | {{#if:{{{p6|}}}| {{Command-param| {{{p6}}}}} | ||
{{#if:{{{p7|}}}|{{Command-param|{{{p7}}} | {{#if:{{{p7|}}}| {{Command-param| {{{p7}}}}} | ||
{{#if:{{{p8|}}}|{{Command-param|{{{p8}}} | {{#if:{{{p8|}}}| {{Command-param| {{{p8}}}}} | ||
{{#if:{{{p9|}}}|{{Command-param|{{{p9}}} | {{#if:{{{p9|}}}| {{Command-param| {{{p9}}}}} | ||
{{#if:{{{p10|}}}|{{Command-param|{{{p10}}} | {{#if:{{{p10|}}}|{{Command-param|{{{p10}}}}} | ||
{{#if:{{{p11|}}}|{{Command-param|{{{p11}}} | {{#if:{{{p11|}}}|{{Command-param|{{{p11}}}}} | ||
{{#if:{{{p12|}}}|{{Command-param|{{{p12}}} | {{#if:{{{p12|}}}|{{Command-param|{{{p12}}}}} | ||
{{#if:{{{p13|}}}|{{Command-param|{{{p13}}} | {{#if:{{{p13|}}}|{{Command-param|{{{p13}}}}} | ||
{{#if:{{{p14|}}}|{{Command-param|{{{p14}}} | {{#if:{{{p14|}}}|{{Command-param|{{{p14}}}}} | ||
{{#if:{{{p15|}}}|{{Command-param|{{{p15}}} | {{#if:{{{p15|}}}|{{Command-param|{{{p15}}}}} | ||
{{#if:{{{p16|}}}|{{Command-param|{{{p16}}} | {{#if:{{{p16|}}}|{{Command-param|{{{p16}}}}} | ||
{{#if:{{{p17|}}}|{{Command-param|{{{p17}}} | {{#if:{{{p17|}}}|{{Command-param|{{{p17}}}}} | ||
{{#if:{{{p18|}}}|{{Command-param|{{{p18}}} | {{#if:{{{p18|}}}|{{Command-param|{{{p18}}}}} | ||
{{#if:{{{p19|}}}|{{Command-param|{{{p19}}} | {{#if:{{{p19|}}}|{{Command-param|{{{p19}}}}} | ||
{{#if:{{{p20|}}}|{{Command-param|{{{p20}}} | {{#if:{{{p20|}}}|{{Command-param|{{{p20}}}}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}<!-- | ||
--> | --><dt>Return Value:</dt> | ||
<dt>Return Value:</dt> | <dd>{{{r1|{{{5|[[Nothing]]}}}}}}</dd> | ||
<dd>{{{5| | </dl><!-- | ||
</dl> | |||
-->{{#if:{{{s2|}}}| | -->{{#if:{{{s2|}}}| | ||
Line 64: | Line 84: | ||
-->{{#if:{{{p21|}}}| | -->{{#if:{{{p21|}}}| | ||
{{Command-param|{{{p21}}}| | {{Command-param|{{{p21}}}|Parameters:}} | ||
{{#if:{{{p22|}}}|{{Command-param|{{{p22}}} | {{#if:{{{p22|}}}|{{Command-param|{{{p22}}}}} | ||
{{#if:{{{p23|}}}|{{Command-param|{{{p23}}} | {{#if:{{{p23|}}}|{{Command-param|{{{p23}}}}} | ||
{{#if:{{{p24|}}}|{{Command-param|{{{p24}}} | {{#if:{{{p24|}}}|{{Command-param|{{{p24}}}}} | ||
{{#if:{{{p25|}}}|{{Command-param|{{{p25}}} | {{#if:{{{p25|}}}|{{Command-param|{{{p25}}}}} | ||
{{#if:{{{p26|}}}|{{Command-param|{{{p26}}} | {{#if:{{{p26|}}}|{{Command-param|{{{p26}}}}} | ||
{{#if:{{{p27|}}}|{{Command-param|{{{p27}}} | {{#if:{{{p27|}}}|{{Command-param|{{{p27}}}}} | ||
{{#if:{{{p28|}}}|{{Command-param|{{{p28}}} | {{#if:{{{p28|}}}|{{Command-param|{{{p28}}}}} | ||
{{#if:{{{p29|}}}|{{Command-param|{{{p29}}} | {{#if:{{{p29|}}}|{{Command-param|{{{p29}}}}} | ||
{{#if:{{{p30|}}}|{{Command-param|{{{p30}}} | {{#if:{{{p30|}}}|{{Command-param|{{{p30}}}}} | ||
{{#if:{{{p31|}}}|{{Command-param|{{{p31}}} | {{#if:{{{p31|}}}|{{Command-param|{{{p31}}}}} | ||
{{#if:{{{p32|}}}|{{Command-param|{{{p32}}} | {{#if:{{{p32|}}}|{{Command-param|{{{p32}}}}} | ||
{{#if:{{{p33|}}}|{{Command-param|{{{p33}}} | {{#if:{{{p33|}}}|{{Command-param|{{{p33}}}}} | ||
{{#if:{{{p34|}}}|{{Command-param|{{{p34}}} | {{#if:{{{p34|}}}|{{Command-param|{{{p34}}}}} | ||
{{#if:{{{p35|}}}|{{Command-param|{{{p35}}} | {{#if:{{{p35|}}}|{{Command-param|{{{p35}}}}} | ||
{{#if:{{{p36|}}}|{{Command-param|{{{p36}}} | {{#if:{{{p36|}}}|{{Command-param|{{{p36}}}}} | ||
{{#if:{{{p37|}}}|{{Command-param|{{{p37}}} | {{#if:{{{p37|}}}|{{Command-param|{{{p37}}}}} | ||
{{#if:{{{p38|}}}|{{Command-param|{{{p38}}} | {{#if:{{{p38|}}}|{{Command-param|{{{p38}}}}} | ||
{{#if:{{{p39|}}}|{{Command-param|{{{p39}}} | {{#if:{{{p39|}}}|{{Command-param|{{{p39}}}}} | ||
{{#if:{{{p40|}}}|{{Command-param|{{{p40}}} | {{#if:{{{p40|}}}|{{Command-param|{{{p40}}}}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}<!-- | ||
-->{{#if:{{{s2|}}}| | -->{{#if:{{{s2|}}}| | ||
<dt>Return Value:</dt> | <dt>Return Value:</dt> | ||
<dd>{{{r2| | <dd>{{{r2|[[Nothing]]}}}</dd> | ||
</dl>|}}<!-- | </dl>|}}<!-- | ||
--> | --> | ||
<h3>Examples</h3> | <h3>Examples</h3> | ||
<dl> | <dl><!-- | ||
-->{{#switch:{{{x1|}}} | -->{{#switch:{{{x1|}}} | ||
Line 107: | Line 127: | ||
</pre> | </pre> | ||
|<pre>example</pre> | |<pre>example</pre> | ||
|<pre>(example)</pre>= | |<pre>(example)</pre>={{Command-example|{{Example needed}}|Example 1:}} | ||
|#default={{Command-example|{{{x1}}} | |#default= {{Command-example|{{{x1}}}|Example 1:}} | ||
{{#if:{{{x2|}}}|{{Command-example|{{{x2}}} | {{#if:{{{x2|}}}|{{Command-example|{{{x2}}}|Example 2:}} | ||
{{#if:{{{x3|}}}|{{Command-example|{{{x3}}} | {{#if:{{{x3|}}}|{{Command-example|{{{x3}}}|Example 3:}} | ||
{{#if:{{{x4|}}}|{{Command-example|{{{x4}}} | {{#if:{{{x4|}}}|{{Command-example|{{{x4}}}|Example 4:}} | ||
{{#if:{{{x5|}}}|{{Command-example|{{{x5}}} | {{#if:{{{x5|}}}|{{Command-example|{{{x5}}}|Example 5:}} | ||
{{#if:{{{x6|}}}|{{Command-example|{{{x6}}} | {{#if:{{{x6|}}}|{{Command-example|{{{x6}}}|Example 6:}} | ||
{{#if:{{{x7|}}}|{{Command-example|{{{x7}}} | {{#if:{{{x7|}}}|{{Command-example|{{{x7}}}|Example 7:}} | ||
{{#if:{{{x8|}}}|{{Command-example|{{{x8}}} | {{#if:{{{x8|}}}|{{Command-example|{{{x8}}}|Example 8:}} | ||
{{#if:{{{x9|}}}|{{Command-example|{{{x9}}} | {{#if:{{{x9|}}}|{{Command-example|{{{x9}}}|Example 9:}} | ||
{{#if:{{{x10|}}}|{{Command-example|{{{x10}}} | {{#if:{{{x10|}}}|{{Command-example|{{{x10}}}|Example 10:}}|}}|}}|}}|}}|}}|}}|}}|}}|}} }}<!-- | ||
--> | --></dl> | ||
<h3>Additional Information</h3> | <h3>Additional Information</h3> | ||
<dl> | <dl> | ||
<dt>Execution:</dt> | <dt>Execution:</dt> | ||
<dd>{{#ifeq:{{{exec|call}}}|call|[[call]]|'''[[{{{exec}}}]]'''}}</dd> | <dd>{{#ifeq:{{{exec|call}}}|call|[[call]]|'''[[{{{exec}}}]]'''}}</dd> | ||
<dt>See also:</dt> | <dt>See also:</dt> | ||
<dd class="seealso">{{busa}}{{#if:{{{6|}}}|{{#replace:{{#replace:{{{6}}}|], [|][}}|],[|][}}|{{See also needed}}}}</dd><!-- | <dd class="seealso">{{busa}}{{#if:{{{6|}}}|{{#replace:{{#replace:{{{6}}}|], [|][}}|],[|][}}|{{See also needed}}}}</dd><!-- | ||
--> | --></dl> | ||
<h3>Notes</h3> | <h3>Notes</h3> | ||
< | <dd style{{=}}"font-size: smaller; text-align: center"> | ||
</div></includeonly><noinclude>{{Command/documentation}} | {{Messagebox | ||
| '''Only post proven facts here.'''<!-- | |||
--> Report bugs on [http://feedback.arma3.com/ the feedback tracker].<!-- | |||
--> Use the [[{{NAMESPACE}} talk:{{PAGENAME}}|Talk page]] or the [https://forums.bohemia.net/ Forums] for discussions. | |||
<div class{{=}}"plainlinks" style{{=}}"margin-top: -0.25em"> | |||
[{{canonicalurl:{{FULLPAGENAMEE}}|action=edit§ion{{=}}new&preload{{=}}Template:Add_new_note&preloadtitle{{=}}&summary{{=}}Added+new+note&nosummary{{=}}true}} Add New Note] <nowiki>|</nowiki> [[How To#Add a new note|How To]] | |||
</div> | |||
| i | |||
| #E5EEF8 | |||
}} | |||
</dd> | |||
</div></includeonly><noinclude> | |||
{{<nowiki/>Command/documentation}} | |||
{{Important | This page is an attempt to refresh the [[Template:Command|Command]] template, do not empty it even if this page is listed in commands categories!}} | |||
<br><br> | |||
---- | |||
{{User:Lou_Montana/Sandbox/Template:Function|Comments= | |||
____________________________________________________________________________________________ | |||
| arma3 |Game name= | |||
|1.00|Game version= | |||
____________________________________________________________________________________________ | |||
| Convert integer to roman numeral (e.g. 42 becomes "XLII"). |DESCRIPTION= | |||
____________________________________________________________________________________________ | |||
| integer [[call]] [[BIS_fnc_romanNumeral]] |SYNTAX= | |||
|p1= integer: [[Number]], [[String]], [[Code]] or [[Config]], same as [[BIS_fnc_parseNumber]] (used in this function) - any '''integer''' between 1 and 3999 |parameter 1= | |||
| [[String]] - Roman number |RETURNVALUE= | |||
____________________________________________________________________________________________ | |||
|x1= <code>1 [[call]] [[BIS_fnc_romanNumeral]]; {{cc|returns "I"}}</code> |EXAMPLE1= | |||
|x2= <code>3999 [[call]] [[BIS_fnc_romanNumeral]]; {{cc|returns "MMMCMXCIX"}}</code> |EXAMPLE2= | |||
____________________________________________________________________________________________ | |||
| [[BIS_fnc_ordinalNumber]], [[BIS_fnc_phoneticalWord]]|SEEALSO= | |||
|pr=This is a problem | |||
|exec= exec | |||
}} | |||
<h3 style="display:none">Notes</h3> | |||
<dl class="command_description"> | |||
<!-- Note Section BEGIN --> | |||
<!-- Note Section END --> | |||
</dl> | |||
<h3 style="display:none">Bottom Section</h3> | |||
[[Category:Function Group: Strings|{{uc:romanNumeral}}]] | |||
[[Category:Functions|{{uc:romanNumeral}}]] | |||
[[Category:{{Name|arma3}}: Functions|{{uc:romanNumeral}}]] | |||
<!-- CONTINUE Notes --> | |||
<dl class="command_description"> | |||
<dd class="notedate">Posted on October 1, 2019 - 01:46 (UTC)</dd> | |||
<dt class="note">[[User:Lou Montana|Lou Montana]]</dt> | |||
<dd class="note"> | |||
A Roman numeral is read like this: | |||
{{{!}} class{{=}}"bikitable" | |||
{{!}}- style{{=}}"font-family: serif; text-align: center" | |||
! style{{=}}"font-family: sans-serif; text-align: left" {{!}} Numeral | |||
{{!}} I {{!}}{{!}} V {{!}}{{!}} X {{!}}{{!}} L {{!}}{{!}} C {{!}}{{!}} D {{!}}{{!}} M | |||
{{!}}- | |||
! Value | |||
{{!}} 1 {{!}}{{!}} 5 {{!}}{{!}} 10 {{!}}{{!}} 50 {{!}}{{!}} 100 {{!}}{{!}} 500 {{!}}{{!}} 1000 | |||
{{!}}} | |||
* It is read from left to right from the biggest numeral to the lowest*, adding up:<br><small>*: not entirely true, see subtractions below</small> | |||
** <tt>DCLVII</tt> {{=}} <tt>D</tt> → <tt>C</tt> → <tt>L</tt> → <tt>V</tt> → <tt>I</tt> → <tt>I</tt> {{=}} 500 + 100 + 50 + 5 + 1 + 1 {{=}} 657 | |||
* A subtraction is done by writing '''one''' smaller numeral before a big one: | |||
** 9 could be written <tt>VIIII</tt>, or <tt>IX</tt> {{=}} 1 and 10 {{=}} 10 - 1 {{=}} 9 / but <tt>IIX</tt> for 8 doesn't exist, only <tt>VIII</tt> | |||
* The same numeral can be put together multiple times, but ''usually'' (there is no standard, but the shorter version is usually preferred) up to the point where it can be subtracted from the bigger numeral above the used one (subtraction still done with only '''one''' numeral): | |||
** <tt>IIII</tt> {{=}} <tt>IV</tt>, <tt>CCCC</tt> {{=}} <tt>CD</tt> | |||
Now let's see if you can translate this one: <tt>MCMLXXXV</tt>. Tip: where it all started ;-) <small><small><tt>MCMLXXXII</tt> for the purists!</small></small><br> | |||
To learn more: '''{{Wikipedia|Roman_numerals|Roman numerals on wikipedia}}''' | |||
</dd> | |||
</dl> | |||
<!-- DISCONTINUE Notes --> | |||
[[Category:Templates|{{uc:{{PAGENAME}}}}]] | [[Category:Templates|{{uc:{{PAGENAME}}}}]] | ||
</noinclude> | </noinclude> |
Revision as of 21:08, 23 December 2019
{{Command/documentation}}
1.00
Problems:
This is a problem
Click on the images for descriptions
Description
- Description:
- Convert integer to roman numeral (e.g. 42 becomes "XLII").
Syntax
- Syntax:
- integer call BIS_fnc_romanNumeral Template:Command-param
- Return Value:
- String - Roman number
Examples
Additional Information
- Execution:
- exec
- See also:
- Template:busaBIS_fnc_ordinalNumberBIS_fnc_phoneticalWord
Notes
Notes
Bottom Section
- Posted on October 1, 2019 - 01:46 (UTC)
- Lou Montana
-
A Roman numeral is read like this:
Numeral I V X L C D M Value 1 5 10 50 100 500 1000 - It is read from left to right from the biggest numeral to the lowest*, adding up:
*: not entirely true, see subtractions below- DCLVII = D → C → L → V → I → I = 500 + 100 + 50 + 5 + 1 + 1 = 657
- A subtraction is done by writing one smaller numeral before a big one:
- 9 could be written VIIII, or IX = 1 and 10 = 10 - 1 = 9 / but IIX for 8 doesn't exist, only VIII
- The same numeral can be put together multiple times, but usually (there is no standard, but the shorter version is usually preferred) up to the point where it can be subtracted from the bigger numeral above the used one (subtraction still done with only one numeral):
- IIII = IV, CCCC = CD
Now let's see if you can translate this one: MCMLXXXV. Tip: where it all started ;-) MCMLXXXII for the purists!
To learn more: Roman numerals on wikipedia - It is read from left to right from the biggest numeral to the lowest*, adding up: