Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
program test
implicit none
character(20) :: tfile="nr .res"
integer :: iter,id1,id2
iter=22
id1=iter/10
id2=iter-10*id1
tfile(3:4)=CHAR(id1+48)//CHAR(id2+48)
write(*,*) tfile
end program
[lcoul@localhost test]$ ifort t45.f90
[lcoul@localhost test]$ ./a.out
nr22.res
program test
implicit none
character(20) :: tfile
integer :: iter
iter=22
write(tfile,"(A,I0,A)") "nr",iter,".res"
write(*,*) tfile
end program
program test
implicit none
character(20) :: tfile
integer :: iter
iter=22
write(tfile,"(A,I9.9,A)") "nr",iter,".res"
write(*,*) tfile
iter=155
write(tfile,"(A,I9.9,A)") "nr",iter,".res"
write(*,*) tfile
end program
[lcoul@localhost test]$ ifort t45.f90
[lcoul@localhost test]$ ./a.out
nr000000022.res
nr000000155.res