-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathhello_world.f
19 lines (17 loc) · 945 Bytes
/
hello_world.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! Hello World program written using the Fortran programming language.
!
! For information on the Fortran language visit: https://www.fortran.com/
! For more information on the Fortran "Hello, World!" program, visit: https://en.wikibooks.org/wiki/Fortran/Hello_world
program hello_world
! The following line prints "Hello, World!". The asterisk indicates to the print statement that the items immediately following the comma after the asterisk should be printed in a format compatible with their type.
print *, "Hello, World!"
end program
! The extension for this file is .f, though, to compile this, any of the Fortran extensions (.for, .f90, .f95, etc.) can be used.
!
! If compiling on a Unix system using the GNU Fortran compiler, execute:
! gfortran hello_world.f
!
! If compiling on Windows, execute:
! f95 hello.f
!
! The Windows compilation command may also be used on Unix, assuming that the appropriate compiler has been installed.