Table Of Contents

Floating Point String to Number (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Converts the characters 0 through 9, plus, minus, e, E, and the decimal point (usually period) in a string to a floating-point number. This node can process strings that use fractional, exponential, or engineering notation.

    connector_pane_image
    datatype_icon

    use system decimal point?

    Boolean specifying whether to use the system decimal separator to designate a decimal point.

    True This node uses the localized decimal separator.
    False This node uses a period as the decimal separator.

    Default: FALSE

    datatype_icon

    string

    The string that you want to convert. This input can also be any data type that contains only strings, such as an array or cluster of strings.

    datatype_icon

    offset

    The number of bytes into the input string at which this node begins its operation.

    The offset of the first byte in the input string is 0. If offset is beyond the end of the input string, this node returns an empty string.

    spd-note-note
    Note  

    Strings are encoded in UTF-8. For strings containing characters in the U+0000 through U+007F range, the number of bytes in a string is equivalent to the number of characters. However, for strings containing the characters U+0080 through U+7FFFFFFF, the number of bytes is greater than the number of characters.

    Default: 0

    datatype_icon

    default

    A numeric value whose representation determines the representation of number.

    Default: Extended-precision, floating point

    datatype_icon

    offset past number

    The index in string of the first byte following the number.

    If string is an array of strings, offset past number reflects the offset within the last string.

    spd-note-note
    Note  

    Strings are encoded in UTF-8. For strings containing characters in the U+0000 through U+007F range, the number of bytes in a string is equivalent to the number of characters. However, for strings containing the characters U+0080 through U+7FFFFFFF, the number of bytes is greater than the number of characters.

    datatype_icon

    number

    The result of converting string into a number. The structure of number matches the structure of string. For example, if string is an array of strings, number is an array of numbers.

    If the input string represents a number outside the range of the representation of number, number is set to the maximum value for that representation.

    The following table shows how the values of string, offset, and default affect number.
    string offset default offset past number number Comments
    -4.7e-3x 0 0 7 -0.0047 x is not allowed, so conversion stops there.
    +5.3.2 0 0 4 5.3 Second decimal point not allowed, so conversion stops there.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics