Was this helpful?
Numeric Format N
The N format specification is identical to the G format specification except that the field is right justified, whether printed with E or F format. Of course, if you specify the optional minus sign (-) before the format designation, the value is left justified.
The syntax of the N format specification is:
[-|*|+] nw[.d]
where:
w
Specifies the maximum field width.
d
Specifies the precision or the number of digits to print after the decimal point.
You can specify either an uppercase N or lowercase n, which determines the case of the ā€œeā€ if printed in scientific notation. For a full description of the meanings of w and d, see the descriptions of Numeric Format E and Numeric Format F.
Numbers printed with N format are right justified in the output field. Unlike G format, the decimal points are not always aligned.
The following table of examples illustrates the N format. The carets (^) in the Output column are used here only to show where blanks occur in the output; they do not print in your report.
Format
Value
Output
n10.2
123.456
^^^^123.46
N10.2
12345678.01
^1.23E+007
n10.2
-2345678.01
-2.35e+006
n8
-123
^^^^-123
+n10.2
123.79
^^^^123.79
-n10.2
123.79
123.79^^^^
Last modified date: 04/03/2024