procedure TForm1.Button1Click(Sender: TObject); var v1,v2:String; begin v1:='A'; v2:= IntToStr(Ord(v1[1])); ShowMessage(v2); end;