BIS fnc parseNumber: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Numbers(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\] " to "")
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

Hover & click on the images for description

Description

Description:
Return number from expression
Execution:
call
Groups:
MathStrings

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

Notes

Bottom Section