Previous Page | Next Page

Formats for NLS

NLNUMw.d Format



Writes the numeric format of the local expression in the specified locale.
Category: Numeric
Alignment: left

Syntax
Syntax Description
Details
Comparisons
Examples
See Also

Syntax

NLNUMw.d


Syntax Description

w

specifies the width of the output field.

Default: 6
Range: 1-32
d

specifies to divide the number by 10d. If the data contains decimal separators, the d value is ignored.

Default: 0
Range: 0-31

Details

The NLMUMw.d format reads integer binary (fixed-point) values, including negative values that are represented in two's-complement notation. The NLNUMw.d format writes numeric values by using the thousands separator and the decimal separator that is used by the locale.


Comparisons

The NLNUMw.d format writes the numeric value with locale-dependent thousand and decimal separators. The NLNUMIw.d format writes the numeric value with a comma (,) as thousand separator and a period (.) as a decimal separator

If the w or d values are not large enough to generate a formatted number, the NLNUMw.d format uses an algorithm that prints the thousands-separator characters whenever possible, even if some decimal precision is lost.


Examples

x=put(-1234356.7891,nlnum32.2);

Statements Results

----+----1----+
options LOCALE=English_UnitedStates;

put x=;
-1,234,356.79
options LOCALE=German_Germany;

put x=;
-1.234.356,79


See Also

Formats:

NLNUMIw.d Format

Informats:

NLNUMw.d Informat

NLNUMIw.d Informat

Previous Page | Next Page | Top of Page