QuickStart Fortran                                  

by Joe Davis

Step-by-step instructions for learning to program in Fortran


 About the language                                                    

Name: Fortran
Year created: 1954
Created by: IBM, John W. Backus
Paradigm: Imperative
Platform: Any for which a compiler is available
Domain: Scientific and mathematical computation
Advantages: Was the first high-level programming language, has features well-suited for scientific and mathematical uses, is one of the oldest programming languages still in use today
Disadvantages: Grammar and syntax may seem old or outdated to those used to newer languages like C++ and Java
Specification: http://www.fortran.com/F77_std/rjcnf.html (FORTRAN 77)
Grammar:  

Step 1. Download and install G95

 

Step 2. Write a "hello world" program

program hello
   print *, "Hello, world!"
end

 

Step 3. Run the "hello world" program

 

Step 4. Explore the possibilities

program circle
	real r, area, circumference
	print *, "Enter radius:"
	read *, r
	area = r * r * 3.14159
	circumference = 2 * r * 3.14159
	print *, "Circumference of circle is", circumference
	print *, "Area of circle is", area
end
program fact
	integer x, f
	f = 1
	print *, "Enter a number:"
	read *, x
	do 10 j = 1, x
		f = f * j
10	continue
	print *, x, "! =", f
end

 Learning more                                                        

There is a vast amount of information available on the Internet.  Some of the best sources are:

 QuickStart Presentation                                           

Download and view the QuickStart Fortran PowerPoint Presentation.

Back to QuickStart Languages