Next: Initialisation
Up: Data Objects
Previous: Character Declarations
Symbolic constants, oddly known as parameters in Fortran, can
easily be set up either in an attributed declaration or parameter statement,
REAL, PARAMETER :: pi = 3.14159
CHARACTER(LEN=*), PARAMETER :: &
son = 'bart', dad = "Homer"
CHARACTER constants can assume their length from the associated literal
(LEN=*).
Parameters should be used:
- if it is known that a variable will only take one value;
- for legibility where a `magic value' occurs in a program such as ;
- for maintainability when a `constant' value could feasibly be changed
in the future.
For more information, click here
Next: Initialisation
Up: Data Objects
Previous: Character Declarations
©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997Not for commercial use.