Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28381 Discussions

Bug: internal write different from printout

Guthrie_M_
Beginner
200 Views

Using Intel Composer XE 2015 on 64-bit Win7 machine. This is perhaps the same bug I found before, but after much effort I tracked down my problem going from G95 to Intel to this, so am reporting it again.

here is the test code:

      implicit none
      integer::i=5
      character(len=4)::char='abc'
      character(len=50)::buf
      
      write(*,*)i,char
      write(buf,*)i,char
      write(*,*)' buf=',trim(buf)
      end

Here is the output:

           5 abc
  buf=           5abc

other compilers preserve space between the two fields.

0 Kudos
1 Reply
Steven_L_Intel1
Employee
200 Views

This is a bug we have already fixed for the upcoming 17.0 release. It is fixed in the public beta.

0 Kudos
Reply