Is it a bug if a training 'nX' specifier is ignored with advance='NO'?

I found that Sun Fortran does not count blanks from an 'nX' specifier when writing with advance='NO'. For example, this code:

write(*,'(A,4X)',advance='NO') '1'

write(*,'(A)') '2'

write(*,'(A,4(" "))',advance='NO') '1'

write(*,'(A)') '2'

end

results in:

12

12

I recall some discussion that the standards were a bit vague on trailing 'nX' with non-advancing I/O.

[448 byte] By [Joe_Krahna] at [2007-11-27 11:45:48]
# 1

> I found that Sun Fortran does not count blanks from

> an 'nX' specifier when writing with advance='NO'. For

> example, this code:

>

> write(*,'(A,4X)',advance='NO') '1'

> write(*,'(A)') '2'

> write(*,'(A,4(" "))',advance='NO') '1'

> write(*,'(A)') '2'

> end

>

> results in:

> 12

> 12

>

> I recall some discussion that the standards were a

> bit vague on trailing 'nX' with non-advancing I/O.

The language in the standard was vague, but the standard

committee recently issued an interpretation that makes it clear.

Unfortunately, it makes it clear that what Sun f95 is doing is

wrong. CR 6580748 has been filed against the bug.

Bob Corbett

rpcorbetta at 2007-7-29 18:03:56 > top of Java-index,Development Tools,Solaris and Linux Development Tools...