Autor Beitrag
noctua
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 170



BeitragVerfasst: Fr 20.05.05 19:53 
ich weiß nicht warum es nicht geht aber es müsste doch, oder?

also ich klicke auf einen button und führe dann dies hier aus

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
  var button : string;
begin
  button := (Sender as TButton).Name;
  button := delete(button,1,2);    // hier is die fehlermeldung
  Memo1.Lines.Add(button);


aber da kommt immer ne fehlermeldung : incompatible typen.......

_________________
Am ende sterben eh alle ................
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Fr 20.05.05 20:01 
Delete ist eine Prozedur, keine Funtkion. :arrow:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
 var button : string;
begin
  button := (Sender as TButton).Name;
  button := delete(button,1,2);    // hier is die fehlermeldung
  Memo1.Lines.Add(button);

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Fr 20.05.05 20:03 
Hallo,

änder die Zeile:
ausblenden Delphi-Quelltext
1:
2:
 // button := delete(button,1,2);    // hier is die fehlermeldung 
delete(button,1,2);    // keine Fehlermeldung


:arrow: Delphi-Hilfe :arrow: Beispiel

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
noctua Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 170



BeitragVerfasst: Fr 20.05.05 20:21 
danke, das hab ich voll vergessen, bin schon zu müde. :lol:

_________________
Am ende sterben eh alle ................