Форум: "Основная";
Текущий архив: 2002.02.21;
Скачать: [xml.tar.bz2];
ВнизНе знаю как сделать type xxx=record Найти похожие ветки
← →
panov (2002-02-04 08:19) [5]Вот пример крошечного класса для работы с битами...
type TBit16 = class
private
FByte: Byte;
function GetBit(index: Integer): Boolean;
procedure SetBit(index: Integer; t: Boolean=True);
public
property Value: byte read FByte write FByte;
property Bit[index: Integer]: Boolean read GetBit write Setbit;
end;
function TBit16.GetBit(index: Integer): Boolean;
begin
Result := Boolean(FByte and (1 shl index));
end;
procedure TBit16.SetBit(index: Integer; t: Boolean=True);
begin
FByte := FByte or (1 shl index);
end;
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.02.21;
Скачать: [xml.tar.bz2];
Память: 0.43 MB
Время: 0.004 c