Autor Beitrag
void*
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 31



BeitragVerfasst: Mi 02.07.03 16:19 
Hallo,

wenn ich in C++ in einer Klasse eine Funktion static mache, kann ich diese Aufrufen ohne ein Objekt der Klasse instantiieren zu müssen(, d.h. ich kann die Methode ohne Objekt benutzen). Gibt es in Delphi ein Äquivalent, und falls ja wie heisst es?

Gruß
void*

_________________
Gruß
void*
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Mi 02.07.03 16:24 
Jupp:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
typ 
  TBla = class;
     ..
    class procedure xy(z:byte);
    ..
  end


ich denke das meintest du...?

_________________
mfg.
mâximôv
void* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 31



BeitragVerfasst: Mi 02.07.03 16:28 
Hallo,

genau das habe ich gesucht. Besten Dank für die super-schnelle Antwort!

Gruß
void*

_________________
Gruß
void*
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Mi 02.07.03 17:17 
Das ist aber eine Klassenfunktion und keine statische Methode. Da ist ein kleiner Unterschied, denn eine static method bekommt keinen versteckten Self-Parameter mit. Die Klassenfunktion hingegen schon. Dieser zeigt aber nicht auf einen Instanz sondern auf die Klasse.

_________________
Ist Zeit wirklich Geld?