** Next:** Parametrised Character
** Up:** Parametrised Intrinsic Types
** Previous:** Mixed KIND Expressions
** Contents**

`Logical variables can be represented differently. For example,
on Alpha 21264, the declaration
`

logical :: l
k = kind(l)

`
gives ``k`=4 (which means that 4 bytes are used to store `l`).
Since logical variables take only one of two possible values, it makes sense
to try to store them using less memory; for example,
logical(kind=1) :: l1
logical(kind=2) :: l2
logical(kind=4) :: l4
l1 = logical(ll,kind=1); l2 = logical(ll,kind=2)

`
``l1` is stored on 1 byte, and `l2` is stored on 2 bytes;
conversion from one representation to another
is done via the `LOGICAL` function, with the `KIND=`
argument.

Adrian Sandu
2001-08-26