------- Comment #6 from jvdelisle at gcc dot gnu dot org  2008-12-22 06:23 
-------
I think that this PR could be considered resolved by the new g0 edit
descriptor.

If, for example, you have three items to emit, the following will do so
regardless of their type.

program minimal_output
  integer :: a
  real :: b
  character(10) :: c

  a = 7
  b = 11.356
  c = "some text"

  print '(3(g0,1x))', a,b,c
!  or
  print '(g0,1x,g0,1x,g0)', a,trim(c),b
end program

With latest trunk, this gives:

$ ./a.out 
7 11.356000 some text 
7 some text 11.356000
$

So the formatting is simple with some control over spacing.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31190

Reply via email to