Previous Page | Next Page

Formats for NLS

NLPCTNw.d Format



Produces percentages, using a minus sign for negative values.
Category: Numeric
Alignment: right

Syntax
Syntax Description
Details
Examples

Syntax

NLPCTNw.d

Syntax Description

w

specifies the width of the output field.

Default: 6
Range: 4-32
Tip: The width of the output field must account for the minus sign ( - ), the percent sign ( % ), and a trailing blank, whether the number is negative or positive.
d

specifies the number of digits to the right of the decimal point in the numeric value. This argument is optional.

Range: 0-31
Requirement: must be less than w

Details

The NLPCTNw.d format multiplies negative values by 100, adds a minus sign to the beginning of the value, and adds a percent sign (%) to the end of the formatted value.


Examples

x=-0.02;

Statements Results
put x nlpctn6.; x=-2%
put x percentn6.; x=-2%

Previous Page | Next Page | Top of Page