Fortran中字符串连接
在fortran中,使用双斜线//对字符串进行连接。(很奇怪的用法)
下面是一个例子。
CHARACTER*20 FILE1,FILE2 CHARACTER*3 prefix CHARACTER*40 FILE11 write(*,*)'Please input the original data file name:' read(*,*) file1 prefix='yx_' file11=prefix//file1 ! or file11='yx_'//file1 open(21,file=file1) open(22,file=file11) write(21,*)'have a good day!' write(22,*) 'have a good day!' close(21) close(22)