and man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



BOOL(3F)							      BOOL(3F)

NAME
     bool: iand, kiand, and, iior, ior, or, jior, kior, inot, jnot, knot, not,
     iieor, jieor, kieor, ieor, xor, iishft, jishft, kishft, ishft, lshift,
     rshift, iishftc, jishftc, kishftc, ishftc, iibits, jibits, kibits, ibits,
     iibset, jibset, kibset, ibset, bitest, bjtest, bktest, btest, iibclr,
     jibclr, kibclr, ibclr, mvbits - FORTRAN bitwise boolean functions

SYNOPSIS
     integer i, k, l, m, n, len
     integer*2 ii1, ii2, ii3
     integer*8 kk1, kk2, kk3
     logical b
     logical*2 c
     logical*8 cc

     i = iand(m, n)
     kk3 = kiand(kk1, kk2)
     i = and(m, n)

     ii3 = iior(ii1, ii2)
     kk3 = kior(kk1, kk2)
     i = ior(m, n)
     i = or(m, n)
     i = jior(m, n)

     ii3 = inot(ii1)
     kk3 = knot(kk1)
     i = jnot(m)
     i = not(m)

     ii3 = iieor(ii1, ii2)
     kk3 = kieor(kk1, kk2)
     i = jieor(m, n)
     i = ieor(m, n)
     i = xor(m, n)

     ii3 = iishft(ii1, ii2)
     kk3 = kishft(kk1, kk2)
     i = jishft(m, k)
     i = ishft(m, k)
     i = lshift(m, k)
     i = rshift(m, k)

     ii3 = iishftc(ii1, ii2, len)
     kk3 = kishftc(kk1, kk2, len)
     i = jishftc(m, k, len)
     i = ishftc(m, k, len)

     ii3 = iibits(ii1, ii2, len)
     kk3 = kibits(kk1, kk2, len)
     i = jibits(m, k, len)
     i = ibits(m, k, len)

									Page 1

BOOL(3F)							      BOOL(3F)

     ii3 = iibset(ii1, ii2)
     kk3 = kibset(kk1, kk2)
     i = jibset(n, k)
     i = ibset(n, k)

     c = bitest(ii1, ii2)
     cc = bktest(kk1, kk2)
     b = bjtest(n, k)
     b = btest(n, k)

     ii3 = iibclr(ii1, ii2)
     kk3 = kibclr(kk1, kk2)
     i = jibclr(n, k)
     i = ibclr(n, k)

     call mvbits(m, k, len, n, l)

DESCRIPTION
     bool is the general name for the bit field manipulation intrinsic
     functions and subroutines from the FORTRAN Military Standard (MIL-STD-
     1753).

     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.	ior, iand, not, ieor - return the same results as and, or,
     not, and xor.

     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.  lshift and rshift are implemented as logical shifts,
     in other words, zeros are shifted in.

     ishft, ishftc - m specifies the integer to be shifted.  k specifies the
     shift count.  k > 0 indicates a left shift.  k = 0 indicates no shift.  k
     < 0 indicates a right shift.  In ishft, zeros are shifted in.  In ishftc,
     the rightmost len bits are shifted circularly k bits.  If k is greater
     than the machine word-size, ishftc will not shift.

     iand, ior, not, ieor, and ishft accept either integer*2 or integer*4
     arguments and the result is the same type.	 When one of these intrinsics
     is specified as an argument in a subroutine call or function reference,
     the compiler supplies either an integer*2 or integer*4 function depending
     on the -i2 command line option.

     Bit fields are numbered from right to left and the rightmost bit position
     is zero.  The length of the len field must be greater than zero.

     ibits - extract a subfield of len bits from m starting with bit position
     k and extending left for len bits.	 The result field is right justified
     and the remaining bits are set to zero.

									Page 2

BOOL(3F)							      BOOL(3F)

     btest - The kth bit of argument n is tested.  The value of the function
     is .TRUE. if the bit is a 1 and .FALSE. if the bit is 0.

     ibset - the result is the value of n with the kth bit set to 1.

     ibclr - the result is the value of n with the kth bit set to 0.

     mvbits - len bits are moved beginning at position k of argument m to
     position l of argument n.

NOTE
     The rightmost bit is bit position 0.

WARNING
     If the user specifies a shift count larger than or equal to the machine
     word size the result of the shift operation is undefined.	Similarly, bit
     operations which involve bit positions less than 0 or greater than the
     machine word size will have indeterminate results.

     Since intrinsic functions promote their arguments to the largest type in
     the argument list, unexpected sign extensions may occur.  For example:

     integer *1 m,k,i,j
     m=-1
     k=1
     i=rshift(m,k)
     j=rshift(m,1)

     The value of i will be 127, a 0 is shifted into bit position 7 of the
     byte.  However the value of j will be -1, both arguments are converted to
     integer, sign extending m, a shift is performed, shifting a 0 into bit
     position 31.  The result is truncated to 8 bits and stored in j.

									Page 3

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net