下面給出一個fortran條件預處理的程序
編譯器爲IVF
在linux上的程序命令與windows的有差別
比如linux: mv 1.txt 2.txt
windows: move 1.txt 2.txt
!DEC$ define linux
program test
implicit none
!DEC$ if defined (linux)
call system( 'mv ' // '1.txt 2.txt' )
!DEC$ else
call system( 'move ' // '1.txt 2.txt' )
!DEC$ endif
end program test