(j3.2006) G editing to a narrow output field

Robert Corbett robert.corbett
Wed Aug 17 02:21:16 EDT 2011


On 08/16/11 23:14, Tobias Burnus wrote:
> Hi Bob,
>
> can you outline why you think that "**    " is the correct output? For 
> me, it seems that "******" is correct. We have (R1007) "G w [ . d [ E 
> e ] ]" and in 10.7.2.1 one has:
>
> "(5) On output, if an exponent exceeds its specified or implied width 
> using the E, EN, ES, D, or G edit descriptor, or the number of 
> characters produced exceeds the field width, the processor shall fill 
> the entire field of width w with asterisks. However, the processor 
> shall not produce asterisks if the field width is not exceeded when 
> optional characters are omitted."
Of course.  The value 1.0 is in the range from 0.1 to
10^5-1.  Therefore, the G6.5 edit descriptor is
equivalent to editing using

      F2.5,4(' ')

with a scale factor of zero.  The F edit descriptor
requires more than two characters, so it exceeds the
output field width of 2.  Therefore, two asterisks
are produced.  Thus, the output is "**    ", which
fits in the G edit descriptor's field width of six
characters.

Bob Corbett



More information about the J3 mailing list