Fortran程序是由程序單元,如一個主程序,模塊和外部子程序或程序的集合。app
每一個程序包括一個主程序和能夠或能夠不包含其它程序單元。主程序的語法以下:編程語言
program program_name implicit none ! type declaration statements ! executable statements end program program_name
讓咱們來寫一個程序,相加了兩個數字,並打印出結果:翻譯
program addNumbers ! This simple program adds two numbers implicit none ! Type declarations real :: a, b, result ! Executable statements a = 12.0 b = 15.0 result = a + b print *, 'The total is ', result end program addNumbers
詳細教程 http://nopapp.com/Blog/Article/what-is-fortran 什麼是fortran語言設計