Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bit(3F) — SunOS 0.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

BIT(3F)  —  System Interface Manual — Fortran Interfaces

NAME

bis, bic, setbit, bit − bit set, clear, test routines

and, or, xor, not − bitwise functions

rshift, lshift − bit shifting functions

SYNOPSIS

subroutine bis (bitnum, word)
integer bitnum, word subroutine bic (bitnum, word)
integer bitnum, word subroutine setbit (bitnum, word, state)
integer bitnum, state
logical state logical function bit (bitnum, word)
integer bitnum, word (intrinsic) function and (word1, word2) (intrinsic) function or (word1, word2) (intrinsic) function xor (word1, word2) (intrinsic) function not (word) (intrinsic) function rshift (word, nbits) (intrinsic) function lshift (word, nbits)

DESCRIPTION

The bit set and clear functions make practical the use of single bit logical entities.  Bis and bic respectively sets or clears bit bitnum in word.  Setbit sets bitnum in word to ’1’ if state is .true.  Bit tests bitnum and returns logical .true.  if it is set.  Bits zero is the lowest order bit. 

The other bitwise functions are built into the compiler and return the data type of their argument(s).  It is recommended that their arguments be integer values; inappropriate manipulation of real objects may cause unexpected results.  Lshift is a logical left shift with no end around carry.  Rshift is an arithmatic right shift with sign extension.  No test is made for a reasonable value of nbits. 

FILES

/usr/ucb/lib/libF77.a

Sun System Release 0.3  —  17 March 1983

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