大家好:
   //接受数据事件
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
  BufferLength: Word);
var
 tmpArray:array[0..4096] of Byte;
 ArraySize,i: DWORD;
 Count:DWORD;
 tmpStr:string;
 pStr:PChar;
begin
  if Check1.Checked  then
  begin
   pStr:=Buffer;
   tmpStr:=string(pStr);
   Dec(PStr);
   for i:=0 to Length(tmpStr)-1 do
    begin
     inc(PStr);
     tmpArray[i]:=Byte(PSTR^);
     Memo2.Lines.Add(IntToHEX(Ord(tmpArray[i]),2));
    end;
   exit;
  end;
  pStr:= Buffer;
  memo2.Lines.Add(pStr);
end;
请问:dec() 函数是干什么的啊?
      byte()呢?