Autor Beitrag
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mi 11.03.09 19:04 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  for i := length (ENumber1.Text) downto 0 do
  begin
    zahl.setcontent(length (ENumber1.Text)-i); //setcontent braucht einen parameter und keine zuweisungweil methode. 
    zahl.next;
    i := i-1;  //das gehört raus! zugriffe auf die laufvariable bei einer vorschleife sind nicht erlaubt!
  end;


lg

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Bblackhawk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mi 11.03.09 19:22 
user profile iconjaenicke hat folgendes geschrieben Zum zitierten Posting springen:

@user profile iconBblackhawk: Die Listenimplementierung ist nicht von dir, oder?



die ist von mir...
Bblackhawk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mi 11.03.09 19:29 
ich habe das problem, dass der mir sagt, wenn ich:
ausblenden Delphi-Quelltext
1:
    zahl.setcontent (length (ENumber1.Text)-i);					


setze...

[DCC Fehler] Unit2.pas(53): E2003 Undefinierter Bezeichner: 'setcontent'


was muss ich denn genau in: zahl.setcontent (length (ENumber1.Text)-i); einfügen (anstelle vonlength (ENumber1.Text)-i), damit der die ziffern von hinten nach vorn in die liste kopiert ??
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: Mi 11.03.09 20:25 
Zahl ist vom Typ List, nicht TNode, du müsstest also damit arbeiten.
Bblackhawk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mi 11.03.09 20:32 
ok, dann müsste ich also
ausblenden Delphi-Quelltext
1:
TNode.setcontent := length (ENumber1.Text)-i					

machen ?


oder ist generell im 2. teil auch was falsch ??
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Do 12.03.09 15:21 
user profile iconBblackhawk hat folgendes geschrieben Zum zitierten Posting springen:
ok, dann müsste ich also
ausblenden Delphi-Quelltext
1:
TNode.setcontent := length (ENumber1.Text)-i					

machen ?


oder ist generell im 2. teil auch was falsch ??


Ne, TNode ist ja nur eine Klasse, kein objekt.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
var Zahl: TNode;
begin
  Zahl := TNode.Create(length(ENumber1.Text)-i, nil);
end;


das erzeugt ein Objekt mit dem Namen Zahl vom Typ TNode. Und mit dem Objekt kannste jetzt arbeiten.

Wozu beim Create eigentlich schon das next angeben? wenn ich einen Knoten erzeug weiß ich ja das nächste noch nicht deswegen wird das eigentlich immer nil sein oder??

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Bblackhawk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Do 12.03.09 17:19 
ah, okay, danke :)

ich probiers ma su ;) :)