Sun Microsystems Sun Workstation — Sun Workstation 1.4 Manual: Release Notes, Installation, Troubleshooting

BIT(3F} FORTRAN LIBRARY ROUTINES B1T(3F} 0 NAME bit - and, or, xor, not, rshift, !shift, bic, bis, bit, setbit functions SYNOPSIS (generic) function and (wordl, word2) (generic) function or (wordl, word2) (generic) function xor (wordl, word2) (generic) function not (word) (generic) function rshlft (word, nblts) (generic) function lshtft (word, nbtts) subroutine blc (bltnum, word) 1nteger•4 bltnum, word subroutine bis (bltnum, word) lnteger•4 bltnum, word subroutine setblt (bltnum, word, state) lnteger•4 bltnum, word, state logical function blt (bltnum, word) lntegeu4 bltnum, word 0 DESCRIPTION The and, or, xor, not, rshift, and /shift functions are generic functions expanded inline by the compiler.

Their arguments must be Integer or logical values (short or long). The returned value has the data type of the first argument. and computes the bitwise 'and' of its arguments. or computes the bitwise 'or' of its arguments. xor computes the bitwise 'exclusive or' of its arguments. not returns the bitwise complement of its argument. lshtft is a logical left shift with no end around carry. rshlft is an arithmatic right shift with sign extension. No test is made for a reasonable value of nbits. Bic, bis, and setbit are external subroutines which operate on integer•4 arguments. bis sets bitnum in word. blc clears bitnum in word.

setbtt sets bitnum in word to 1 if state is nonzero and clears it otherwise. bit is an external function which tests bitnum in word and returns .true. if bitnum is a 1 (one}, and returns .false. if bitnum is a O (zero). FILES /usr /lib /libF77 .a 0 5b La.5t change: 9 January 1984 Sun Release 1.4