parseNumber: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (categorized)
mNo edit summary
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''parseNumber''' text |= Syntax
| [[Number]] <nowiki>=</nowiki> '''parseNumber''' "text" |= Syntax


|p1= text: [[String]] |= Parameter 1
|p1= text: [[String]] |= Parameter 1
Line 17: Line 17:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= number <nowiki>=</nowiki> '''parseNumber''' "0.125" |= Example 1
|x1= _number <nowiki>=</nowiki> '''parseNumber''' "0.125" |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 16:38, 28 August 2007

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Parse string containing real number.
Groups:
Uncategorised

Syntax

Syntax:
Number = parseNumber "text"
Parameters:
text: String
Return Value:
Number

Examples

Example 1:
_number = parseNumber "0.125"

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

Notes

  • If the text does not represent a number ("abc" for example), parseNumber will return 0 (zero). It is therefore not possible to use parseNumber to determine if the string contains a valid number or not.

Bottom Section