Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bool(3F) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

bool(3F)

NAME

and, or, xor, not, lshift, rshift, lshiftl, rshiftl, lshifta, rshifta − Fortran bitwise boolean functions

SYNOPSIS

integer i, j, k
integer∗2 i2, j2, k2

k = and(i, j)
k2 = and(i2, j2)
k = or(i, j)
k2 = or(i2, j2)
k = xor(i, j)
k2 = xor(i2, j2)
j = not(i)
j2 = not(i2)
k = lshift(i, j)
k = lshift(i2, j2)
k = rshift(i, j)
k = rshift(i2, j2)
k = lshiftl(i, j)
k = lshiftl(i2, j2)
k = rshiftl(i, j)
k = rshiftl(i2, j2)
k = lshifta(i, j)
k = lshifta(i2, j2)
k = rshifta(i, j)
k = rshifta(i2, j2)

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 lshiftl return the value of the first argument logically shifted left the number of times specified by the second (integer) argument.  rshift and rshifta return the value of the first argument arithmetically shifted right the number of times specified by the second (integer) argument.  rshiftl returns the value of the first argument logically shifted right the number of times specified by the second (integer) argument.  lshifta returns the value of the first argument arithmetically shifted left the number of times specified by the second (integer) argument. 

NOTE

Although defined for all data types, use of boolean functions on any but integer data is bizarre and will probably result in unexpected consequences. 

BUGS

The implementation of the shift functions may cause large shift values to deliver weird results. 

CX/UX Hf77 Fortran Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026