Einzelnen Beitrag anzeigen

janjan

Registriert seit: 16. Jan 2003
Ort: Bonn ("links über Königswinter ")
240 Beiträge
 
Delphi 4 Standard
 
#6
  Alt 4. Mär 2003, 21:46
Probiers mal so:
Delphi-Quellcode:
ShowMessage(IntToStr(Byte(sCom[1])) + IntToStr(Byte(sCom[2])));
if (sCom[1] = #106) and (Byte(sCom[2]) = #0) then
begin
  ShowMessage('Falsches Byte');
end
else if ((sCom[1] = #106) and ((Byte(sCom[2]) and 32) <> 0)) then
begin
ShowMessage('Richtiges Byte');
end; //if
Oder mach sowas in die Richtung:
Delphi-Quellcode:
if (sCom[1] = #106) then
  begin
    if Byte(sCom[2]) = #0 then
      begin
        ShowMessage('Falsch');
      end;
    if (Byte(sCom[2]) and 32) <> 0 then
      begin
        ShowMessage('Richtig');
      end;
  end;
Die Wichtigkeit eines Postings im Forum ist reziprok zur Anzahl der enthaltenenen, kumulierten Ausrufungszeichen!!!
  Mit Zitat antworten Zitat