Writes numeric values as percentages.
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 percent sign (% ) and parentheses for negative numbers,
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 PERCENTw.d format multiplies values by 100, formats them the same
as
the BESTw.d format,
and adds a percent sign (%) to the end of the formatted value, while it encloses
negative values in parentheses.
put @10 gain percent10.;
Value of x |
Results |
|
----+----1----+----2
|
0.1
|
10%
|
1.2
|
120%
|
-0.05
|
( 5%)
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.