https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48852

--- Comment #12 from Thomas Henlich <thenlich at users dot sourceforge.net> ---
(In reply to Jerry DeLisle from comment #10)
> gfortran currently does this with default formatting, list directed outout:
>  ---------------------------------
>  (  1.00000000    ,  0.00000000    ) ( -1.00000002E-25,  0.00000000    )
>  ( -1.00000002E-25,  0.00000000    ) (  1.00000000    ,  0.00000000    )
>  ( -3.49999992E-24, -3.49999992E-24) ( -4.19999998E-24, -1.27000003E-23)
>  (  1.00000000    ,  0.00000000    ) ( -1.00000002E-25,  0.00000000    )
>  ---------------------------------
> 
> I have my experimental doing this: case A
>  ---------------------------------
>  (1.00000000,0.00000000)             (-0.10000000E-24,0.00000000)       
>  (-0.10000000E-24,0.00000000)        (1.00000000,0.00000000)            
>  (-0.34999999E-23,-0.34999999E-23)   (-0.42000000E-23,-0.12700000E-22)  
>  (1.00000000,0.00000000)             (-0.10000000E-24,0.00000000)       
>  ---------------------------------
> 
> I could also do this: case B
>  ---------------------------------
>  (1.00000000,0.00000000          ) (-0.10000000E-24,0.00000000     )       
>  (-0.10000000E-24,0.00000000     ) (1.00000000,0.00000000          )        
> 
>  (-0.34999999E-23,-0.34999999E-23) (-0.42000000E-23,-0.12700000E-22)  
>  (1.00000000,0.00000000          ) (-0.10000000E-24,0.00000000     )       
>  ---------------------------------
> 
> or is there some other arrangement?

I think your case B is invalid, because no spaces are allowed in constants,
i.e. between the parentheses (see above).

There is also case C (right-flush in 2*w+3):
 ---------------------------------
           (1.00000000,0.00000000)      (-0.10000000E-24,0.00000000)
      (-0.10000000E-24,0.00000000)           (1.00000000,0.00000000)            
 (-0.34999999E-23,-0.34999999E-23) (-0.42000000E-23,-0.12700000E-22)  
           (1.00000000,0.00000000)      (-0.10000000E-24,0.00000000)       
 ---------------------------------

The standard says:

"Numeric editing, General rules: ... On output, the representation is right
justified in the field. If the number of characters produced by the editing is
smaller than the field width, leading blanks are inserted in the field."

Reply via email to