BIS fnc numberDigits: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Function " to "{{RV|type=function ") |
Lou Montana (talk | contribs) m (Text replacement - "\{\{ *codecomment *\| *\/\/ *([^ ]+) *\}\} " to "{{cc|$1}}") |
||
Line 35: | Line 35: | ||
<dd class="note"> | <dd class="note"> | ||
Use this function with caution: Numbers with more than 8 digits will return wrong results | Use this function with caution: Numbers with more than 8 digits will return wrong results | ||
<code>[11111111] [[call]] [[BIS_fnc_numberDigits]]; {{ | <code>[11111111] [[call]] [[BIS_fnc_numberDigits]]; {{cc| returns [1,1,1,1,1,1,1,1]}}[111111111] [[call]] [[BIS_fnc_numberDigits]]; {{cc| returns [1,1,1,1,1,1,1,1,2]}}[1111111111111] [[call]] [[BIS_fnc_numberDigits]]; {{codecomment|// returns [1,1,1,1,1,1,1,1,0,6,5,6,0]}}</code> | ||
[111111111] [[call]] [[BIS_fnc_numberDigits]]; {{ | |||
[1111111111111] [[call]] [[BIS_fnc_numberDigits]]; {{codecomment|// returns [1,1,1,1,1,1,1,1,0,6,5,6,0]}}</code> | |||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 16:30, 29 January 2021
Description
- Description:
- Description needed
- Execution:
- call
- Groups:
- ArraysStrings
Syntax
- Syntax:
- Syntax needed
- Parameters:
- number: Number - Number that should be broken down. A float will be truncated, not rounded
- Return Value:
- Return value needed
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:
- See also needed
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]