Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Procedures -Delphi (https://www.delphipraxis.net/175759-procedures-delphi.html)

question 15. Jul 2013 20:31

Procedures -Delphi
 
Hello,

I have one basic question, what is the differene the following procedures:

procedure Test(Sender : Tobject);
Procedure Test();
Procedure Test;


Thanks in advance for your reply

Uwe Raabe 15. Jul 2013 21:18

AW: Procedures -Delphi
 
The first procedure has one parameter, while the second and third have none. For those both styles are allowed.

Der schöne Günther 16. Jul 2013 09:46

AW: Procedures -Delphi
 
Note that you may also omit the parameters when implementing a method you have already declared. Code completion sometimes does that. You don't have to. And I don't think you should :wink:

Delphi-Quellcode:
interface

[...]
   procedure myProcedure(Sender: TObject);
[...]

implementation

procedure myClass.myProcedure;
begin
   [...]
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:10 Uhr.

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