I checked this out to fix it but there are two issues:

0.  The 'bug fix' Roger made for 6.01 means that now the code does not 
conform to the Dictionary, which says (for ":):

Otherwise (if w<0 or d<0),  the result is put in exponential form (with 
one digit before the decimal point) and is left-justified except for two 
fixed spaces on the left (including one for a possible negative sign).

The two fixed spaces have been removed.

1.  There is no way to request exponential formatting with no fractional 
digits.  In previous releases __ ": 10 would format to 1e1, but in 6.02 
it is a domain error.  (__j.0) doesn't work either.

   Can this be put back the way it used to work (and documented in DoJ)? 
  Otherwise there is no way to format exponentials with no fraction.



I am going leave printf unchanged until this is resolved.

Henry Rich


Tom Arneson wrote:
> Something happened to break the e field specification in sprintf from
> printf.ijs
> 
>  
> 
>    '%0.2e'sprintf 1e_4
> 
> .00e-4
> 
>    '%f'sprintf 1e_4
> 
> 0.000100
> 
>    '%g'sprintf 1e_4
> 
> 0.000100
> 
>    '%e'sprintf 1e_4
> 
> .000000e-4
> 
>    '%5.1e'sprintf 1e_4
> 
> .0e-4
> 
>  
> 
> The following is from the Test Lines
> 
>    ': 5.500000e0:' -: ':%e:' sprintf 5.5
> 
> 0
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to