我正在尝试获取 a 的高 4 位Byte
。
到目前为止,这是我的尝试:
function Upper4Bits(const X : Byte): Byte;
type
BS = set of 0..7;
var
K : Byte; Q: BS;
begin
Q := [];
for K := 0 to 3 do {is it right? upper?}
{what i need here?}
Include(Q, {what i put here});
Upper4Bits := Byte(Q)
end;
提前致谢。