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.66 byte, byte-size, byte-position Function

byte size position    bytespec

byte-size bytespec    size

byte-position bytespec    position

Arguments and Values:
size, position - a non-negative integer.

bytespec - a byte specifier.

byte returns a byte specifier that indicates a byte of width size and whose bits have weights 2position + size - 1 through 2position, and whose representation is implementation-dependent.

byte-size returns the number of bits specified by bytespec.

byte-position returns the position specified by bytespec.

 (setq b (byte 100 200))  #<BYTE-SPECIFIER size 100 position 200>
 (byte-size b)  100
 (byte-position b)  200

See Also:
ldb, dpb

 (byte-size (byte j k)) ==j
 (byte-position (byte j k)) ==k

A byte of size of 0 is permissible; it refers to a byte of width zero. For example,

 (ldb (byte 0 3) #o7777)  0
 (dpb #o7777 (byte 0 3) 0)  0

Allegro CL Implementation Details:

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