Algorithm Math Delphi

Title: convert Hex codes to Integer?
// This tip convert the Hex Code AFFE to integer
procedure TForm1.Button1Click(Sender: TObject);
begin
label1.Caption := IntToStr(StrToInt('$AFFE')); //45054
end;