Autor Beitrag
Roboman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: Mo 05.10.09 15:31 
Hallo Leute,

ich habe ein kleines Problem. Ich möchte HEX-Werte irgendwie über ein Edit-Feld eingeben und dann weiter verarbeiten, aber ich weis nicht wie.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
    if v[i]=#13 then
      begin
        ListBox1.ItemIndex:=+1;
        ListBox2.ItemIndex:=+1;
      end;

Ich hab da ne Abfrage, die zur Zeit fix ist. Ich würde gerne das das #13 flexibel wir und meien Idee ist halt das ich das über ein Edit-Feld ändern kann. Aber wie kann ich das umwandeln das das von einem Edit-Feld auch so geht?

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 05.10.09 15:38 
Moin!

Meinst du sowas? :gruebel:
ausblenden Delphi-Quelltext
1:
if (v[i] = Chr(StrToInt('$'+Edit1.Text))) then					

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Roboman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: Mo 05.10.09 15:44 
Jo, man hab ich nen Balken vor dem Kopf. Genau sowas such ich. Und es war mal wieder so eindeutig. Gut, ich schule um und werde Bäcker. *grins*.

Vielen herzlichen Dank.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 05.10.09 15:56 
Moin!

Markierst du den Thread noch entsprechend, wenn dein Problem gelöst ist? Danke. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Roboman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: Sa 10.10.09 18:55 
Sorry, musste kurzfristig in den Außendienst.

Frage: Warum hast du ein $-Zeichen da drin stehen und keine #-Zeichen? Bin grad erst wieder hier online,
daher hab ich das leider erst jetzt lesen können????

Wünsche einen schönen Abend.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 10.10.09 19:03 
# bewirkt im Quelltext, dass die Zahl dahinter als Zeichen interpretiert wird. $ ist das Zeichen für eine folgende hexadezimal dargestellte Zahl, sowohl im Quelltext als auch für StrToInt.

Daher ist das erste Zeilenumbruchzeichen z.B. auch das:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
const
  sLineBreakChar1 = #$D;
// oder
  sLineBreakChar1 = #13;
Roboman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: Sa 10.10.09 19:09 
Ok, Ok, werde mich wieder mehr mit Delphi befassen. *grins*

Danke für die Info, das macht mir sogar das Leben noch leichter.

Vielen vielen Dank.