Chapter Contents

Previous

Next
NEGPARENw.d

NEGPARENw.d



Writes negative numeric values in parentheses

Category: Numeric
Alignment: right


Syntax
Syntax Description
Details
Comparisons
Examples

Syntax

NEGPARENw.d

Syntax Description

w
specifies the width of the output field.
Default: 6
Range: 1-32

d
optionally specifies the number of digits to the right of the decimal point in the numeric value.
Range: 0-2


Details

The NEGPARENw.d format displays nonnegative numbers with blanks instead of parentheses for proper column alignment. That is, NEGPARENw.d reserves the last column for a right parenthesis, even when the value is positive. If the field is wide enough, NEGPARENw.d places parentheses around a number to represent a negative value. Otherwise, it uses a minus sign.


Comparisons

The NEGPARENw.d format is similar to the COMMAw.d format in that it separates every three digits of the value with a comma.


Examples

put @1 sales negparen5.;

Values Results

----+----1----+
100
 100
1000
1,000
-2000
(200)
-2000
-2,000


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.