![[LISPWORKS]](../Graphics/LWSmall.gif)
![[Common Lisp HyperSpec (TM)]](../Graphics/CLHS_Sm.gif) 
 ![[Previous]](../Graphics/Prev.gif)
![[Up]](../Graphics/Up.gif)
![[Next]](../Graphics/Next.gif)
Syntax:
deposit-field newbyte bytespec integer => result-integer
Arguments and Values:
newbyte---an integer.
bytespec---a byte specifier.
integer---an integer.
result-integer---an integer.
Description:
Replaces a field of bits within integer; specifically, returns an integer that contains the bits of newbyte within the byte specified by bytespec, and elsewhere contains the bits of integer.
Examples:
(deposit-field 7 (byte 2 1) 0) => 6 (deposit-field -1 (byte 4 0) 0) => 15 (deposit-field 0 (byte 2 1) -3) => -7
Side Effects: None.
Affected By: None.
Exceptional Situations: None.
See Also:
Notes:
 (logbitp j (deposit-field m (byte s p) n))
 ==  (if (and (>= j p) (< j (+ p s)))
        (logbitp j m)
        (logbitp j n))
 deposit-field is to mask-field as dpb is to ldb.
![[Starting Points]](../Graphics/StartPts.gif)
![[Contents]](../Graphics/Contents.gif)
![[Index]](../Graphics/Index.gif)
![[Symbols]](../Graphics/Symbols.gif)
![[Glossary]](../Graphics/Glossary.gif)
![[Issues]](../Graphics/Issues.gif)