BIS fnc numberText: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Numbers(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\] " to "") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| tkoh |Game name= | | tkoh |Game name= | ||
Line 9: | Line 8: | ||
|gr2 = Strings |GROUP2= | |gr2 = Strings |GROUP2= | ||
| Convert a number into string (avoiding scientific notation). |Description= | | Convert a number into string (avoiding scientific notation). |Description= | ||
|pr= It is very imprecise with larger numbers. See [[#Examples|Example 3]]. |PROBLEMS= | |pr= It is very imprecise with larger numbers. See [[#Examples|Example 3]]. |PROBLEMS= | ||
| [number, modulo] call [[BIS_fnc_numberText]] |Syntax= | | [number, modulo] call [[BIS_fnc_numberText]] |Syntax= | ||
Line 23: | Line 20: | ||
| [[String]] |Return value= | | [[String]] |Return value= | ||
|x1= <code>[4096] [[call]] [[BIS_fnc_numberText]]; {{cc|"4 096"}}</code> |EXAMPLE1= | |x1= <code>[4096] [[call]] [[BIS_fnc_numberText]]; {{cc|"4 096"}}</code> |EXAMPLE1= | ||
Line 30: | Line 26: | ||
|x3= <code>[999999999999] [[call]] [[BIS_fnc_numberText]];{{cc|"909 999 995 904"}}</code> |EXAMPLE3= | |x3= <code>[999999999999] [[call]] [[BIS_fnc_numberText]];{{cc|"909 999 995 904"}}</code> |EXAMPLE3= | ||
| [[BIS_fnc_numberDigits]], [[BIS_fnc_cutDecimals]] |See also= | | [[BIS_fnc_numberDigits]], [[BIS_fnc_cutDecimals]] |See also= |
Revision as of 23:24, 16 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