gfortran error: unexpected element '\' in format string at (1)
问题 I have a project written in VS2010 with Intel Visual Fortran. I have a dump subroutine to write a 2D matrix into file: subroutine Dump2D(Name,Nx,Ny,Res) implicit none integer i,j,Nx,Ny real(8) :: Res(Nx,Ny) character(len=30) name,Filename logical alive write(filename,*) trim(Name),".dat" Write(*,*) "Saving ",trim(Name)," Please wait..." open (10,file=filename) do i=1,Ny Write(10,FMt="(D21.13\)") (Res(j,i),j=1,Nx) Write(10,*) end do close(10) Write(*,*) "Save ",trim(Name),"Complete!" return