Debian Codegraph @

doc/rotate-byte.html

raw
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <HTML>
3 <HEAD>
4 <TITLE>Function ROTATE-BYTE</TITLE>
5 <LINK REL="stylesheet" HREF="style.css" type="text/css">
6 </HEAD>
7 <BODY>
8
9 <p><p><i>Function</i> <b>ROTATE-BYTE</b></a></a> <p>
10 <p><b>Syntax:</b><p>
11
12 <p>
13
14 <p><b>rotate-byte</b> <i>count bytespec integer</i> => <i>result</i>
15 <p>
16 <p><b>Arguments and Values:</b><p>
17 <p>
18 <i>count</i>---an <i>integer</i></a>. <p>
19
20 <i>bytespec</i>---a <i>byte specifier</i></a>. <p>
21
22 <i>integer</i>---an <i>integer</i></a>. <p>
23
24 <i>result</i>---an <i>integer</i></a>. <p>
25
26 <p>
27 <p><b>Description:</b><p>
28
29 <p>Rotates a field of bits within <i>integer</i>; specifically, returns an
30 integer that contains the bits of <i>integer</i> rotated <i>count</i> times
31 leftwards within the byte specified by <i>bytespec</i>, and elsewhere
32 contains the bits of <i>integer</i>.</p>
33
34 <p><p><b>Examples:</b></p>
35 <pre>
36 (rotate-byte 3 (byte 32 0) 3) => 24
37 (rotate-byte 3 (byte 5 5) 3) => 3
38 (rotate-byte 6 (byte 8 0) -3) => -129
39 </pre>
40
41 <p><p><b>Side Effects:</b> None.</p>
42
43 <p><p><b>Affected By:</b> None.</p>
44
45 <p><p><b>Exceptional Situations:</b> None.</p>
46
47 <p><p><b>See Also:</b></p>
48
49 <p><a class="hyperspec" href ="
50 http://www.lispworks.com/documentation/HyperSpec/Body/fun_bytecm_by_yte-position.html"><b>byte</b></a>,
51 <a class="hyperspec" href ="
52 http://www.lispworks.com/documentation/HyperSpec/Body/fun_dpb.html"><b>dpb</b></a>, <a
53 class="hyperspec" href ="
54 http://www.lispworks.com/documentation/HyperSpec/Body/acc_ldb.html"><b>ldb</b></a>
55
56 <p><b>Implementation notes</b>
57
58 <p>SBCL provides the sb-rotate-byte extension to do this
59 efficiently. On SBCL, cl-utilities uses this extension
60 automatically. On other implementations, portable Common Lisp code is
61 used instead.
62
63 <p class="footer"><hr><a href="index.html">Manual Index</a></p>
64
65 </body></html>