This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/20618] Variable format expressions not supported


------- Additional Comments From Thomas dot Koenig at online dot de  2005-03-24 14:29 -------
Actually, implementing this would be a bit harder
than I thought.

It seems that the variable expression is evaluated
at runtime, so you can do things like

$ cat v-fmt2.f
      program main
      character*1 c
 10   continue
      read(fmt=9000,unit=*,end=20) j,c
      print *,c
      goto 10
 20   continue
 9000 format(i1,t<j>,a1)
      end
$ ifort -traceback v-fmt2.f
$ ./a.out
1abcd
 1
2abcd
 a
3abcd
 b

Still doable with non-advancing I/O and internal writes, but
tricky.

-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]