ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   12 Numbers   12.2 Dictionary of Numbers

12.2.70 ldb-test Function

ldb-test bytespec integer    generalized-boolean

Arguments and Values:
bytespec - a byte specifier.

integer - an integer.

generalized-boolean - a generalized boolean.

Returns true if any of the bits of the byte in integer specified by bytespec is non-zero; otherwise returns false.

 (ldb-test (byte 4 1) 16)  true
 (ldb-test (byte 3 1) 16)  false
 (ldb-test (byte 3 2) 16)  true

See Also:
byte, ldb, zerop

 (ldb-test bytespec n) ==
 (not (zerop (ldb bytespec n))) ==
 (logtest (ldb bytespec -1) n)

Allegro CL Implementation Details:

Home Previous Up Next Table of Contents Index
© Franz Inc. 1998-2015 - File last updated 03-23-2015