Fract/Exp String To Number Function

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: String/Number Conversion Functions

Requires: Base Development System

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.

Details  Example

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.
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.
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.
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.
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.
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.

Fract/Exp String To Number Details

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

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


Refer to the Extract Numbers with Match Pattern VI in the labview\examples\Strings directory for an example of using the Fract/Exp String To Number function.


Not Helpful