next up previous contents
Next: The Layout of FORTRAN Up: Introduction to FORTRAN Previous: Contents

   
INTRODUCTION

This is an introduction to FORTRAN 77 (the 77 comes from 1977-the year that the ANSI standard was defined). It is not complete or rigorous but aims to introduce the language to a user with little or no experience of FORTRAN. The ANSI standard language is available on all main computer systems. Unfortunately computer manufacturers cannot resist adding features of their own so the user may have some problems when moving from one computer to another. The situation is much better than it was (the main driving force for the 77 standard was to rationalise different enhancements to a more basic FORTRAN 4), but users should avoid non-standard features unless they offer very real advantage. Only standard features are described here.

The best way to learn is by doing so if possible this introduction should be read while sitting at a terminal and the supplied exercises attempted. Interactive computing is very powerful and the safeguards built in are comprehensive which means that a user can experiment as much as he or she likes. So the moral is - if in doubt try it out!

Use a file name such as test.for to hold FORTRAN source programs. To compile link and run use the commands:-

          f77 -o test test.for
          ./test
The first command tells the FORTRAN compiler to compile test.for and store the output in the file test. The second command then run this file.
next up previous contents
Next: The Layout of FORTRAN Up: Introduction to FORTRAN Previous: Contents
n west (APC)
2000-03-08