Previous Page | Next Page

Formats

PERCENTNw.d Format



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

Syntax
Syntax Description
Details
Comparisons
Examples
See Also

Syntax

PERCENTNw.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 PERCENTNw.d format multiplies negative values by 100, formats them the same as the BESTw.d format, adds a minus sign to the beginning of the value, and adds a percent sign (%) to the end of the formatted value.


Comparisons

The PERCENTNw.d format produces percents by using a minus sign instead of parentheses for negative values. The PERCENTw.d format produces percents by using parentheses for negative values.


Examples

put x percentn10.;

Value of x Results
-0.1
      -10%
.2
       20%
.8
       80%
-0.05
       -5%
-6.3
     -630%


See Also

Format:

PERCENTw.d Format

Previous Page | Next Page | Top of Page