Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3    Statistic    FMM    Blog  

Math.TextToNumber

Converts a text to a number.

Component Version macOS Windows Linux Server iOS SDK
Math 2.9 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Math.TextToNumber"; text { ; detect } )   More

Parameters

Parameter Description Example Flags
text Some text value where you want to get the number back. "123.456"
detect Pass 1 to detect comma vs. dot and interpret number right. 1 Optional

Result

Returns number.

Description

Converts a text to a number.
This function always uses english system (dot as decimal separator).

Examples

Detect that number has dot as decimal divider and read number:

MBS("Math.TextToNumber"; "123,456.789"; 1)

Detect that number has comma as decimal divider and read number:

MBS("Math.TextToNumber"; "123.456,789"; 1)

See also

Example Databases

Blog Entries

Created 18th August 2014, last changed 16th March 2015


Math.PolylineEncode - Matrix.Add

Feedback: Report problem or ask question.




Links
MBS Xojo blog

Start Chat