Fract/Exp String To Number Function

LabVIEW 2014 Help

Edition Date: June 2014

Part Number: 371361L-01

»View Product Info
Download Help (Windows Only)

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 unwired or if less than 0, the default is 0.
default is any object of numeric representation and specifies the numeric representation for number. The default is an extended-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