Number To Fractional String Function

FlexRIO Help

Edition Date: November 2015

Part Number: 372614J-01

»View Product Info

»Download the Help in ZIP Format

Owning Palette: String/Number Conversion Functions

Requires: Base Development System

Converts number to an F-format (fractional notation), floating-point string at least width characters wide or wider if necessary.

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


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.
number can be a scalar number, array or cluster of numbers, array of clusters of numbers, and so on.
width must be numeric. If unwired, the function uses exactly as many digits as are needed to represent the number, with no extra padding.
precision must be numeric. The function rounds the number of digits after the decimal point of the output string to precision.
F-format string is the resulting fractional string. F-format string can be Inf, -Inf, or NaN if the value you wire to number is infinity or is not a number. The following table shows how the values of number, width, and precision affect F-format string. In this table, the underline character ( _ ) represents a space in F-format string.
numberwidthprecisionF-format stringComments
4.92562_ _4.92number is rounded, padded with spaces on the left.
.00392684_ _0.0039number is rounded, padded with spaces on the left.
–287.350_–287number is rounded, padded with spaces on the left.

Number To Fractional String Details

This function rounds number to the nearest integer. If the fractional part of number is .5, the function rounds the value to the nearest even integer. For example, the function rounds 13.5 to 14 and rounds 14.5 to 14.


Not Helpful