FORMAT(number [,[before] [,[after] [,[expp] [,expt]]]] ) The given number is rounded and formatted according to the information given, as described below (note that the number is always rounded according to NUMERIC DIGITS, if necessary, before being processed by this function): If just `number' is specified, then it is formatted according to the usual rules for REXX numerics. The number is formatted, possibly in exponential form, with `before' digits before the decimal point and `after' digits after. `before' must be strictly positive and includes any leading minus sign. `after' must be non-negative. If `after' is zero, then there will be no decimal point in the output. If either `before' or `after' is omitted, then as many places as required are used. If `before' is too small then an error results. If it is too large, then leading spaces are used to fill the extra places. The number is rounded or extended with zeros as necessary in order to have `after' digits after the decimal point (note that this is not the same as TRUNC, which truncates the number rather than rounding it). The rounding rules are as usual - the first digit which is not required is checked and if it is 5 or more, the last required digit is incremented. `expt' specifies the trigger for exponential form. Exponential form is used whenever the number would otherwise require more than `expt' digits before or more than twice `expt' digits after the decimal point. If `expt' is zero, exponential form is always used. The number will be formatted according to NUMERIC FORM, and may need up to three places before the decimal point if ENGINEERING form is in effect. The default value for `expt' is the current setting of NUMERIC DIGITS. `expp' specifies the number of digits (excluding the letter E and the sign) used for the exponent. If it is zero, exponential form is never used (this overrides the setting of `expt' if necessary). Otherwise, if exponential form needs to be used, the exponent must fit in the specified width, or an error results. Leading zeros are added as necessary to make the exponent the correct width. A zero exponent, however, always causes `expp+2' spaces to be added instead of the exponent (but no spaces if expp is omitted, or is zero). If `expp' is omitted, then as many places as required are used for the exponent. Examples: (with NUMERIC FORM SCIENTIFIC and NUMERIC DIGITS 9) format('3',4) == ' 3' format('1.73',4,0) == ' 2' format('1.73',4,3) == ' 1.730' format('-.76',4,1) == ' -0.8' format('0.000') == '0' format('12345.73',,,2,2) == '1.234573E+04' format('12345.73',,3,,0) == '1.235E+4' format('1.2345',,3,2,0) == '1.235 ' format('1234567e5',,3,0) == '123456700000.000'