NLPCTPw.d Format

Writes locale-specific numeric values as percentages.
Category: Numeric
Alignment: right

Syntax

NLPCTPw.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 percent sign (% ).
d
specifies the number of digits to the right of the decimal point in the numeric value. This argument is optional. The thousand separator and decimal symbol for the NLPCTP format is locale-specific.
Range:0–31
Requirement:must be less than w

Details

The NLPCTPw.d format multiplies values by 100, formats them, and adds a percent sign (%) to the end of the formatted value. The NLPCTPw.d format is similar to the The PERCENTw.d format except that the thousand separator and decimal symbol for the NLPCTPw.d format is locale-specific.

Example

x=-0.02;
Statements
Results
put x nlpctp6.;
–2%
put x percent6.;
( 2%)