BIS fnc numberDigits: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Undo revision 237894 by R3vo (talk))
Tag: Undo
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
Line 28: Line 28:
<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on March 20, 2018 - 21:25 (UTC)</dd>
<dd class="notedate">Posted on March 20, 2018 - 21:25 (UTC)</dd>
<dt class="note">[[User:vabene1111|vabene1111]]</dt>
<dt class="note">[[User:vabene1111|vabene1111]]</dt>

Revision as of 14:28, 5 April 2021

Hover & click on the images for description

Description

Description:
Break number into array of digits.
Execution:
call
Groups:
ArraysStrings

Syntax

Syntax:
number call BIS_fnc_numberDigits
Parameters:
number: Number - Number that should be broken down. A float will be truncated, not rounded
Return Value:
Array of Numbers - Array of number digits

Examples

Example 1:
12345678 call BIS_fnc_numberDigits; // returns [1,2,3,4,5,6,7,8]
Example 2:
123.9999 call BIS_fnc_numberDigits; // returns [1,2,3]

Additional Information

See also:
BIS_fnc_numberTextBIS_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
Posted on March 20, 2018 - 21:25 (UTC)
vabene1111
Use this function with caution: Numbers with more than 8 digits will return wrong results [11111111] call BIS_fnc_numberDigits; // returns [1,1,1,1,1,1,1,1] [111111111] call BIS_fnc_numberDigits; // returns [1,1,1,1,1,1,1,1,2] [1111111111111] call BIS_fnc_numberDigits; // returns [1,1,1,1,1,1,1,1,0,6,5,6,0]