Fortran Variables and Their Types
A Fortran variable can be considered as a box that is capable of
holding a single value of certain type. Thus, a variable has a name,
the variable name and a type. The way of choosing a name for
a variable must fulfill the rules of composing a Fortran
identifier. The type of a variable can be
one of the following:
- INTEGER:
the variable is capable of holding an integer
- REAL:
the variable is capable of holding a real number
- COMPLEX:
the variable is capable of holding a complex
number
- LOGICAL:
the variable is capable of holding a logical
value (i.e., true or false)
- CHARACTER:
the variable is capable of holding a character
string of certain length
Click here to learn the forms of
these values.
Click here to learn more about
declaring variables.