Autor Beitrag
PISAFOX
Hält's aus hier
Beiträge: 8



BeitragVerfasst: Mi 06.08.08 09:15 
guten Morgen
mein lehrer quält mich gerade mit aufgaben die man wunderschön in schleife unterbringen könnte aber wir müssen sie rekusive schreiben jetzt hab ich ein problem.
Was muss ich machen damit das unterprogram die Memo erkennt?

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
var I:byte;

Procedure FLAK(pZahl,pZahl2:int64);
var pZahl3:int64; Bla:string;
Begin
  pzahl3:=pzahl+pzahl2;
  pzahl:=pzahl2;
  pZahl2:=pZahl3;
  Bla:= inttostr (pZahl3);
  Memo1.Lines.add(BLA);     [b]// Hier lieg das Problem er findet diese MEMOkomponente nicht[/b]
  i:=i+1;           [b]// und sagt:[Fehler] Unit1.pas(34): Undefinierter Bezeichner: 'Memo1'[/b]
  FLAK(pZahl,pZahl2);

end;

procedure TForm1.FormCreate(Sender: TObject);
const N:Byte=50;
var BLA:string; Zahl,Zahl2:byte;
begin
  zahl:=1;
  Bla:= inttostr (Zahl);
  Memo1.Lines.add(BLA);
  zahl2:=2;
  Bla:= inttostr (Zahl2);
  Memo1.Lines.add(BLA);

  FLAK(Zahl,Zahl2);
end;

end.


Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mi 06.08.08 09:18 
Form1.Memo

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
uko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 220
Erhaltene Danke: 1

Win XP, VISTA, WIndows 7
Delphi 2007/2010 Prof
BeitragVerfasst: Mi 06.08.08 09:19 
Warum sollte Memo1 denn auch gefunden werden? Memo1 ist ein Element von TForm1, deine Procedure FLAK aber nicht.
--> FLAK in eine Methode von TForm1 umwandeln :-)

Uli
PISAFOX Threadstarter
Hält's aus hier
Beiträge: 8



BeitragVerfasst: Mi 06.08.08 09:23 
Perfekt danke