next up previous
Next: Intrinsic functions Up: Fundamental constructions of F77 Previous: Definition of variables

Definiton of parameters

Parameters, or constants as they are often used in other programming languages, are symbolic names which contain a value that cannot be changed during the run of your program. This is mainly convenient once you work with constants like $\pi$ or $e$ which are not implicitly defined in the F77 standard and thus have to be defined in your programs.

Before defining a parameter, you should always declare its type. These two operations occur above the instruction part of your code and might look as follows:

      real pi, e
      parameter( pi=3.2415927, e=2.7182818 )
Note, that it is of utmost importance to always declare the data type of each parameter prior to defining its value. If you are curious to see what happens if you do not declare the parameter type first, check with any standard F77 manual or write a short code and play with it.

Roman Groger