Interprets the characters 0 through 9, plus, minus, e, E, and the decimal point (usually period) in string starting at offset as a floating-point number in engineering notation, exponential, or fractional format and returns it in number.

The connector pane displays the default data types for this polymorphic function.


icon

Inputs/Outputs

  • cbool.png use system decimal point (T)

    use system decimal point defines the decimal separator.

    If TRUE (default), the decimal separator uses the localized decimal separator. If FALSE, the decimal separator is a period.
  • cstr.png string

    string can be a string, a cluster of strings, an array of strings, or an array of clusters of strings.

    If string contains the characters Inf or NaN, this function returns the LabVIEW values Inf and NaN, respectively.
  • ci32.png offset

    offset specifies number of characters into string at which the function starts searching for a match. offset must be numeric.

    The offset of the first character in string is 0. If offset is unwired or less than 0, the function takes offset as 0.
  • cdbl.png default (0 DBL)

    default is any object of numeric representation and specifies the numeric representation for number.

    The default is a double-precision, floating-point value of 0.
  • ii32.png offset past number

    offset past number is the index in string of the first character following the number.

    offset past number reflects the value from the last string if you input an array of strings.
  • idbl.png number

    number can be a number, a cluster, an array of numbers, or an array of clusters, depending on the structure of string.

    The following table shows how the values of string, offset, and default affect number.

    stringoffsetdefaultoffset past numbernumberComments
    –4.7e–3x007–0.0047x is not allowed, so conversion stops there.
    +5.3.20045.3Second decimal point not allowed, so conversion stops there.

    If you scan a string that does not fit into the numeric data type you specify, this function returns the largest number that fits into that data type.

  • If you want the function to return a 64-bit integer output, you must wire a 64-bit integer to the default input.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Strings\Extract Numbers with Match Pattern.vi