bool(3F) bool(3F)
NAME
and, or, xor, not, lshift, rshift - FORTRAN bitwise boolean
functions
SYNOPSIS
integer i, j, k
real a, b, c
double precision dp1, dp2, dp3
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.
The boolean functions are generic, i.e., defined for all
data types as arguments and return values. Where required,
the compiler generates appropriate type conversions.
NOTE
Although defined for all data types, use of boolean
functions on non-integer data is not productive.
BUGS
The implementation of the shift functions may cause large
shift values to deliver unexpected results.
Page 1 (last mod. 1/14/87)