Previous Page | Next Page

Formats for NLS

NLBESTw. Format



Writes the best numerical notation based on the locale.
Category: Numeric
Alignment: right

Syntax
Syntax Description
Details
Examples

Syntax

NLBESTw.


Syntax Description

w

specifies the width of the output field.

Default: 12
Tip: If you print numbers between 0 and .01 exclusively, then use a field width of at least 7 to avoid excessive rounding. If you print numbers between 0 and -.01 exclusively, then use a field width of at least 8.
Range: 1-32

Details

The NLBEST format writes the best numerical value based on the locale's decimal point and the sign mark's location. NLBEST is similar to the BEST format. For more information, see the BEST format in the SAS Language Reference: Dictionary.


Examples

The following code produces results based on the locale:

x=-1257000
 put x nlbest6.;
 put x nlbest3.;
 put "=====";
x=-0.1
 put x nlbest6.;
 put x nlbest3.;
 put "=====";
x=0.1
 put x nlbest6.;
 put x nlbest3.;
 put "=====";
x=1257000
 put x nlbest6.;
 put x nlbest3.;

Locales Results
locale=English_UnitedStates -126E4

***

=====

-0.1

-.1

=====

0.1

0.1

=====

1.26E6

1E6

locale=German_Germany -126E4

***

=====

-0,1

-,1

=====

0,1

0,1

=====

1,26E6

1E6

locale=ar_BH 126E4-

***

=====

0.1-

.1-

=====

0.1

0.1

=====

1.26E6

1E6

Previous Page | Next Page | Top of Page