Einzelnen Beitrag anzeigen

Codix32

Registriert seit: 23. Apr 2009
137 Beiträge
 
Delphi 2005 Personal
 
#1

HI und LO liefern falsche Werte

  Alt 1. Jan 2015, 18:21
Delphi-Version: 2005
Was mache ich da falsch?

Delphi-Quellcode:
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var
    int:Integer;
begin
  if Key = VK_Return then
    begin
     int:=strtoint(Edit1.text);
     Label4.Caption:= 'ganze Zahl: '+ inttostr(int);
     Label2.Caption:= 'HI: '+ inttostr(hi(int));
     Label3.Caption:= 'LO: '+ inttostr(lo(int));
end;
end;
Bei 2345 bekomme ich als 'HI' die Zahl 9 und bei 'LO' die Zahl 41 ?!?
Sollte da nicht HI 23 und LO 45 rauskommen?
  Mit Zitat antworten Zitat