11. Report-Writer Expressions and Formats : Format Specifications : Numeric Format E
 
Share this page                  
Numeric Format E
The E format prints numeric expressions in scientific notation. Numbers output in E format take the form of
[-]m.nnnnnE|e[+|-]ppp
where m is the mantissa, n is the number of decimal digits, and p is an exponential digit.
For example, 10.456e+03 means 10.456 times 10 raised to the 3rd power. Numbers output in E format are right justified in the field, unless preceded by a .left statement or the minus sign (-) in the format designation.
The syntax of an E format specification is:
[-|*|+] ew[.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 or lowercase e, which also determines the case of the "e" in the output. Specify the field width w, which refers to the maximum number of spaces in the field. Be sure to include spaces in the field width to account for the exponential part of the printout--that is, include five spaces for E+ppp. If the value can be printed in fewer than w spaces, Report-Writer right justifies it in the field. If this width is too small to fit the value to be printed, Report-Writer fills the entire field with asterisks (*) instead.
If you specify d, Report-Writer prints a decimal point, followed by d digits to the right of the decimal point.
If you do not specify d, or if you specify a value of "0" for d (for example, E20.0), Report-Writer does not print the decimal point and rounds off any fractional digits (it does print the exponential part).
This table illustrates the E format specification. 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
e10.3
22.3
2.230e+001
E10.2
-.123
-1.23E-001
e10
123.789
^1238e-001
E4.2
22.34
****
+E10.2
22.34
^2.23E+001
-e10.2
22.34
2.23e+001^