Autor Beitrag
der Berliner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Sa 01.04.06 15:28 
Hallo zusammen
was ist hier dran falsch
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
type
  TFMain = class(TForm)
    Label1: TLabel;
    LJahr: TLabel;
    procedure FormCreate(Sender: TObject);
   -->>>>>>> function IstDatum(S:String):Boolean; <<<<<<<--
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;


und jetzt sagt bitte nicht das die hier (-->>>>>><<<<<<--) Falsch sind

Es komm der Fehler
Zitat:
[Fehler] UMain.pas(14): E2065 Ungenügende Forward- oder External-Deklaration: 'TFMain.IstDatum'


Danke für eure Hilfe
Gruß
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Sa 01.04.06 15:31 
Es gibt die funktion einfach nicht ;>
Du musst sie dann auch implemenieren, die Deklaration ist richtig.

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Danniolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 693



BeitragVerfasst: Sa 01.04.06 15:32 
Hm.. du deklarierst da eine Funktion, die es dann später gar nicht gibt.
Unter "Implementation" sollte dann noch etwas ála:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
function IstDatum(S:String):Boolean;
Begin
  //blubbb
End;


stehen^^
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Sa 01.04.06 15:33 
die funktion muss irgendwo existieren Bsp:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
function TForm1.IstDatum(S:String):Boolean;
begin
  Result:= True;
end;
der Berliner Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Sa 01.04.06 15:34 
Die Funktion habe ich geschrieben :autsch:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Function IstDatum(S:String):Boolean;
Var
 Dummy:TDateTime;
begin
Result:=True;
 Try
  Dummy:=StrToDate(S);
 Except
  Result:=False;
 end;
end;


Trotzdem kommt der fehler oben.
Ich glaub ich steh aufm Schlauch ich mach das doch nicht zum ersten mal :autsch:
Danniolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 693



BeitragVerfasst: Sa 01.04.06 15:36 
ah.. versuchs mal damit:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Function TFMain.IstDatum(S:String):Boolean;
Var
 Dummy:TDateTime;
begin
Result:=True;
 Try
  Dummy:=StrToDate(S);
 Except
  Result:=False;
 end;
end;


Zuletzt bearbeitet von Danniolo am Sa 01.04.06 15:41, insgesamt 2-mal bearbeitet
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Sa 01.04.06 15:36 
du hast das unter der TFMain deklariert, desahl muss es heißen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Function TFMain.IstDatum(S:String):Boolean;  
Var  
 Dummy:TDateTime;  
begin  
Result:=True;  
 Try  
  Dummy:=StrToDate(S);  
 Except  
  Result:=False;  
 end;  
end;
Stefan-W
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Sa 01.04.06 15:36 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Function TFMain.IstDatum(S:String):Boolean;
Var
 Dummy:TDateTime;
begin
Result:=True;
 Try
  Dummy:=StrToDate(S);
 Except
  Result:=False;
 end;
end;

vllt so?

// schade kleich 3 Antworen in den letzten paar sekunden und ich war der lezte :-(
der Berliner Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: Sa 01.04.06 15:38 
Ok..freunde..habs Kapiert
Danke
Ich muss mal ne Pause machen.
Gruß
ub60
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 765
Erhaltene Danke: 130



BeitragVerfasst: Sa 01.04.06 17:15 
Noch ein kleiner Tipp:
Wenn Du innerhalb der Typdeklaration die Tastenkombination Strg+Shift+C drückst, erledigt Delphi die Erstellung des Quelltextes im Implementationteil automatisch (also nur die Kopfzeile mit begin und end, nicht den Inhalt :) ).

ub60
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 01.04.06 17:59 
Aber nur ab Professional und höher.
der Berliner Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 417

Win Xp Home
delphi 2005
BeitragVerfasst: So 02.04.06 06:15 
Hallo nochmal..

Danke an alle.
Gruß