BIS fnc numberText: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| tkoh | | tkoh | ||
|1.00 | |1.00 | ||
|gr1 = Math | |gr1 = Math | ||
|gr2 = Strings | |gr2 = Strings | ||
| Convert a number into string (avoiding scientific notation). | | Convert a number into string (avoiding scientific notation). | ||
|pr= It is very imprecise with larger numbers. See [[#Examples|Example 3]]. | |pr= It is very imprecise with larger numbers. See [[#Examples|Example 3]]. | ||
| [number, modulo] call [[BIS_fnc_numberText]] | | [number, modulo] call [[BIS_fnc_numberText]] | ||
|p1= number: [[Number]] | |p1= number: [[Number]] | ||
|p2= modulo: [[Number]] - (Optional, default 3) | |p2= modulo: [[Number]] - (Optional, default 3) | ||
| [[String]] | | [[String]] | ||
|x1= <code>[4096] [[call]] [[BIS_fnc_numberText]]; {{cc|"4 096"}}</code> | |x1= <code>[4096] [[call]] [[BIS_fnc_numberText]]; {{cc|"4 096"}}</code> | ||
|x2= <code>[512, 1] [[call]] [[BIS_fnc_numberText]]; {{cc|"5 1 2"}}</code> | |x2= <code>[512, 1] [[call]] [[BIS_fnc_numberText]]; {{cc|"5 1 2"}}</code> | ||
|x3= <code>[999999999999] [[call]] [[BIS_fnc_numberText]];{{cc|"909 999 995 904"}}</code> | |x3= <code>[999999999999] [[call]] [[BIS_fnc_numberText]];{{cc|"909 999 995 904"}}</code> | ||
| [[BIS_fnc_numberDigits]], [[BIS_fnc_cutDecimals]] | | [[BIS_fnc_numberDigits]], [[BIS_fnc_cutDecimals]] | ||
}} | }} | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:{{Name|arma3}}: Functions|{{uc:numberText}}]] | [[Category:{{Name|arma3}}: Functions|{{uc:numberText}}]] |
Revision as of 23:37, 17 January 2021
Description
- Description:
- Convert a number into string (avoiding scientific notation).
- Execution:
- call
- Problems:
- It is very imprecise with larger numbers. See Example 3.
- Groups:
- MathStrings
Syntax
- Syntax:
- [number, modulo] call BIS_fnc_numberText
- Parameters:
- number: Number
- modulo: Number - (Optional, default 3)
- Return Value:
- String
Examples
- Example 1:
[4096] call BIS_fnc_numberText; // "4 096"
- Example 2:
[512, 1] call BIS_fnc_numberText; // "5 1 2"
- Example 3:
[999999999999] call BIS_fnc_numberText;// "909 999 995 904"
Additional Information
- See also:
- BIS_fnc_numberDigitsBIS_fnc_cutDecimals
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note