Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi function->tfunction (https://www.delphipraxis.net/142668-function-tfunction.html)

Apollonius 1. Nov 2009 13:53

Re: function->tfunction
 
Meiner Erinnerung nach erfordert Delphi bei Funktionszeigern das @.

himitsu 1. Nov 2009 15:21

Re: function->tfunction
 
nein, das erfordert Lazarus/GreePascal.

Wenn das Ziel eine Funktionsvariable oder ein Funkctionsparameter ist, dann weiß Delphi schon, daß man da den Zeiger übergeben will.

vsilverlord 8. Nov 2009 18:44

Re: function->tfunction
 
also das
Zitat:

Delphi-Quellcode:
// Einzelfunktion
tfunction = function({params}; private: Integer): result;

// Methode
tmethod = function({params}): result of object;

funktioniert nicht, der frisst die geringelte klammer nicht :D

Mithrandir 8. Nov 2009 18:50

Re: function->tfunction
 
ok, "params" ist in diesem Falle nur ein Platzhalter für die Parameter deiner Wahl...

himitsu 8. Nov 2009 18:52

Re: function->tfunction
 
An diese Stelle wäre die/deiner Parameterliste, welche ich der Übersichtlichkeit halber wegließ
und mir dachte das versteht man schon, was da hin soll :oops:

z.B.
Delphi-Quellcode:
// Einzelfunktion
tfunction = function(irgendwas: byte; private: Integer): result;

// Methode
tmethod = function(irgendwas: byte): result of object;
oder
Delphi-Quellcode:
// Einzelfunktion
tfunction = function(irgendwas: byte; nochwas: pointer; private: Integer): result;

// Methode
tmethod = function(irgendwas: byte; nochwas: pointer): result of object;
uswusf.


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:20 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz