参考连接: Fortran-数字html
能够使用Write()函数来实现,如: ide
INTEGER :: p函数
p=123spa
CHARACTER*5 strorm
WRITE (str,'(I5.5)') phtm
获得的str就是字符串“00123”字符串