ibset(3I)

IBSET, IIBSET, JIBSET, KIBSET - Sets one bit

Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.

NAME
     IBSET, IIBSET, JIBSET, KIBSET - Sets one bit

SYNOPSIS
     IBSET ([I=]i, [POS=]pos)
     IIBSET ([I=]i, [POS=]pos)
     JIBSET ([I=]i, [POS=]pos)
     KIBSET ([I=]i, [POS=]pos)

STANDARDS
     Fortran 95

     IIBSET, JIBSET, and KIBSET are extensions to FORTRAN 77 and Fortran
     95.

DESCRIPTION
     The IBSET, IIBSET, JIBSET, and KIBSET intrinsic functions set one bit
     to 1.  They accepts the following arguments:

     i    Must be of type integer.  For IIBSET, must be of type integer
          (KIND=2).  For JIBSET, must be of type integer (KIND=4).  For
          KIBSET, must be of type integer (KIND=8).

     pos  Must be of type integer.  It must be nonnegative and less than
          BIT_SIZE (i).

     These are elemental intrinsic functions.  The names of these
     intrinsics cannot be passed as arguments.

RETURN VALUES
     The result type and type parameter are the same as i.  The result has
     the value of the sequence of bits of i, except that bit pos of i is
     set to one.  The bit model defines the interpretation of an integer
     value as a sequence of bits.  For more information on the bit model,
     see the MODELS(3I) man page.

EXAMPLES
     IBSET(12, 1) has the value 14.

     If V has the value [1, 2, 3, 4], the value of IBSET(POS = V, I = 0) is
     [2, 4, 8, 16].

SEE ALSO
     MODELS(3I)