Autor Beitrag
day
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 107



BeitragVerfasst: Mi 16.06.04 19:44 
hallo

wie kann ich eine Variable private deklarieren? Es gibt zwar die möglichkeit methoden private zu deklarieren aber dort habe ich es nicht geschafft variablen als private zu deklarieren.


Moderiert von user profile iconPeter Lustig: Topic aus Sonstiges verschoben am Mi 16.06.2004 um 20:47
Moderiert von user profile iconTino: Titel geändert.
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Mi 16.06.04 20:19 
Titel: hmm,
da kannste auch Variablen als Private declarieren, diese müssen aber VOR den proceduren/functions stehen , in der Declaration !
Da ist der Delphicompiler etwas streng.

_________________
mfg. Joel
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mi 16.06.04 20:21 
Doch, es geht schon.. nur müssen Variablen und Properties vor Methoden deklariert werden:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
private
  FVariable: Integer; // <-- geht
  procedure xyz;
  FVariable2: Integer; // <-- geht nicht

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
day Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 107



BeitragVerfasst: Mi 16.06.04 20:40 
danke für die Antwort