BIS fnc numberText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (typo)
m (Fix description)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Convert a number into string (avoiding scientific notation). It's very imprecise with larger numbers. See example 1. |Description=
| Convert a number into string (avoiding scientific notation). |Description=
 
|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=


|p1= number: [[Number]] |Parameter 1=
|p1= number: [[Number]] |Parameter 1=
Line 19: Line 21:
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[999999999999] [[call]] [[BIS_fnc_numberText]];//Returns "909 999 995 904"</code> |Example 1=
|x1= <code>[4096] [[call]] [[BIS_fnc_numberText]]; {{cc|"4 096"}}</code> |EXAMPLE1=
 
|x2= <code>[512, 1] [[call]] [[BIS_fnc_numberText]]; {{cc|"5 1 2"}}</code> |EXAMPLE2=
 
|x3= <code>[999999999999] [[call]] [[BIS_fnc_numberText]];{{cc|"909 999 995 904"}}</code> |EXAMPLE3=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 33: Line 39:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:numberText}}]]
[[Category:Function Group: Numbers|{{uc:numberText}}]]
[[Category:Function Group: Numbers|{{uc:numberText}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:numberText}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:numberText}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:numberText}}]]

Revision as of 12:56, 26 September 2020

Hover & click on the images for description

Description

Description:
Convert a number into string (avoiding scientific notation).
Execution:
call
Problems:
It is very imprecise with larger numbers. See Example 3.
Groups:
Uncategorised

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

Notes

Bottom Section