BOOL(3F) SysV BOOL(3F)
NAME
bool: and, or, xor, not, lshift, rshift - FORTRAN Bitwise Boolean
functions
SYNOPSIS
integer i, j, k
real a, b, c
k = and(i, j)
c = or(a, b)
j = xor(i, a)
j = not(i)
k = lshift(i, j)
k = rshift(i, j)
DESCRIPTION
The generic intrinsic Boolean functions and, or and xor return the value
of the binary operations on their arguments. not is a unary operator
returning the one's complement of its argument. lshift and rshift return
the value of the first argument shifted left or right, respectively, the
number of times specified by the second (integer) argument.
While it is recommended that Boolean functions be used only on integer
data, these functions are generic; that is, they are defined for all data
types as arguments and return values. Where required, the compiler
generates appropriate type conversions. However, when the functions are
not used with integer data, the results are unpredictable.
BUGS
The implementation of the shift functions may cause large shift values to
deliver weird results.
SEE ALSO
mil(3F).