User Tools


====== Function LDB-TEST ====== ====Syntax==== * **ldb-test** //bytespec integer// → //generalized-boolean// ====Arguments and Values==== * //bytespec// - a //[[CL:Glossary:byte specifier]]//. * //integer// - an //[[CL:Glossary:integer]]//. * //generalized-boolean// - a //[[CL:Glossary:generalized boolean]]//. ====Description==== Returns //[[CL:Glossary:true]]// if any of the bits of the byte in //integer// specified by //bytespec// is non-zero; otherwise returns //[[CL:Glossary:false]]//. ====Examples==== <blockquote> (ldb-test ([[CL:Functions:byte]] 4 1) 16) <r>//[[CL:Glossary:true]]// </r> (ldb-test ([[CL:Functions:byte]] 3 1) 16) <r>//[[CL:Glossary:false]]// </r> (ldb-test ([[CL:Functions:byte]] 3 2) 16) <r>//[[CL:Glossary:true]]// </r> </blockquote> ====Side Effects==== None. ====Affected By==== None. ====Exceptional Situations==== None. ====See Also==== * **[[CL:Functions:byte|Function BYTE]]** * **[[CL:Functions:ldb|Function LDB]]** * **[[CL:Functions:zerop|Function ZEROP]]** ====Notes==== <blockquote> (ldb-test bytespec n) ≡ ([[CL:Functions:not]] ([[CL:Functions:zerop]] ([[CL:Functions:ldb]] bytespec n))) ≡ ([[CL:Functions:logtest]] ([[CL:Functions:ldb]] bytespec -1) n) </blockquote>