The following are data types intrinsic to Fortran:
integer real character complex logical
complex are numeric types.
character is a type used to store character strings.
logical is used to store binary values
All numeric and logical intrinsic types are parametrized using kinds.
specific_kind is an integer named constant.
Character variables, as well as having a kind parameter, also have a length parameter:
char to be a length-1 character variable of default kind, whereas
name to be a character variable of default kind and length
len. The kind can also be specified
character(len=len, kind=specific_kind) name character(kind=specific_kind) char
name to be a character of kind
kind and length
char is a length-1 character of kind
Alternatively, the obsolete form for character declaration
may be seen in older code, declaring
name to be of length
len and default character kind.
Declaration of a variable of intrinsic type may be of the form above, but also may use the
integer i real x double precision y
is equivalent to (but greatly preferred over)
type(integer) i type(real) x type(double precision) y