------- Comment #2 from wchemelewski at gmail dot com 2010-02-24 02:36 ------- Thanks for being a dick, appreciated.(In reply to comment #1)
> (In reply to comment #0) > > With the following code: > > > > INTEGER :: someint > > CHARACTER (LEN=40) :: strcounter > > WRITE(strcounter,'(I)') someint > > > > The error message is generated: > > > > WRITE(strcounter,'(I)') someint > > 1 > > Error: Nonnegative width required in format string at (1) > > > > Which to me just suggests that gfortran does not have the (i believe) > > standard > > behavior of automatically assigning a width to the format descriptor based > > on > > the given integer. However, this only appears to be a problem when using a > > character variable/internal file. > > > > It suggests to me that you need to read a book on Fortran or > the Standard. It also fails for writing to unit=6. > > laptop:kargl[207] gfortran44 -o z a.f90 > a.f90:2.11: > > write(*,'(I)') i > 1 > Error: Nonnegative width required in format string at (1) > > > You can get want you by using 'write(strcounter,*) someint' > or 'write(strcounter,'(I0)') someint'. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43158