Autor Beitrag
elcomportal
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48

Win XP home
D5 standard
BeitragVerfasst: Mi 07.05.03 18:52 
Hi,

habe ein kleines Prob. Ich habe einen String 'a1c'. Jetzt brauche ich die ASCII Werte der einzelnen Zeichen. Also muss rauskommen $65 $31 $67

Wie geeehhht das?! So eine Sch... !

Vielen Dank für Eure schnellen Antworten! :wink:

Moderiert von user profile icontommie-lie: Topic verschoben und Titel geändert
inselberg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458



BeitragVerfasst: Mi 07.05.03 18:54 
for i:=1 to length(str) do ascii:=ord(str[i]);

_________________
hans bist du das ?
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Mi 07.05.03 19:32 
ich bin gemein, das wird nie rauskommen :-)


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
function ConvertStr2Hex(Input:String):String;
var S:String;
      I:Integer;
begin
  S:=''; // set empty
  for I:=1 to length(Input) do
    S:= S+ 
      Format('%x',[ ord ( input[i] ) ] );
  result:= S;
end;


grez
msch
elcomportal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48

Win XP home
D5 standard
BeitragVerfasst: Mi 07.05.03 21:06 
Titel: Vielen Dank!
Super!! :D Vielen Dank für Eure Hilfe!
Es Grüsst Euch Torsten.
:wink: