BIS fnc parseNumber: 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= | ||
| arma2 |Game name= | | arma2 |Game name= | ||
Line 9: | Line 8: | ||
|gr2 = Strings |GROUP2= | |gr2 = Strings |GROUP2= | ||
| Return number from expression |DESCRIPTION= | | Return number from expression |DESCRIPTION= | ||
| value call [[BIS_fnc_parseNumber]] |SYNTAX= | | value call [[BIS_fnc_parseNumber]] |SYNTAX= | ||
Line 19: | Line 16: | ||
| [[Number]] - parsed number, -1 if value is not a number |RETURNVALUE= | | [[Number]] - parsed number, -1 if value is not a number |RETURNVALUE= | ||
|x1= <code>_result = 7.62 [[call]] [[BIS_fnc_parseNumber]]; | |x1= <code>_result = 7.62 [[call]] [[BIS_fnc_parseNumber]]; | ||
_result = "7.62" [[call]] [[BIS_fnc_parseNumber]]; | _result = "7.62" [[call]] [[BIS_fnc_parseNumber]]; | ||
_result = { 7.62 } [[call]] [[BIS_fnc_parseNumber]];</code> |EXAMPLE1= | _result = { 7.62 } [[call]] [[BIS_fnc_parseNumber]];</code> |EXAMPLE1= | ||
| [[parseNumber]] |SEEALSO= | | [[parseNumber]] |SEEALSO= |
Revision as of 23:48, 16 January 2021
Description
Syntax
- Syntax:
- value call BIS_fnc_parseNumber
- Parameters:
- value: Number, String, Code or Config
- Return Value:
- Number - parsed number, -1 if value is not a number
Examples
- Example 1:
_result = 7.62 call BIS_fnc_parseNumber; _result = "7.62" call BIS_fnc_parseNumber; _result = { 7.62 } call BIS_fnc_parseNumber;
Additional Information
- See also:
- parseNumber
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