Produces percentages, using a minus sign for negative
values.
Category: |
Numeric
|
Alignment: |
right
|
- 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 |
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.
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.
put x percentn10.;
Value of x |
Results |
-0.1
|
-10%
|
.2
|
20%
|
.8
|
80%
|
-0.05
|
-5%
|
-6.3
|
-630%
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.