All Manuals > LispWorks User Guide and Reference Manual > 40 The LISPWORKS Package

NextPrevUpTopContentsIndex

rotate-byte

Function
Summary

Rotates specified bits within an integer.

Package

lispworks

Signature

rotate-byte count byte-spec integer => result-integer

Arguments

count

An integer.

bytespec

A byte specifier.

integer

An integer.

Values

result-integer

An integer.

Description

The function rotate-byte returns integer with the bits specified by bytespec rotated left by count bits. Other bits remain the same as in integer. If count is negative, then the effect is to rotate right.

See also

http://www.cliki.net/rotate-byte

Examples
(rotate-byte 2 (byte 3 1) 99) => 105 (rotate-byte -2 (byte 3 1) 99) => 101

LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex