Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi const/var/out in Prozeduraufruf (https://www.delphipraxis.net/89622-const-var-out-prozeduraufruf.html)

ibp 3. Apr 2007 10:33


const/var/out in Prozeduraufruf
 
Hallo,

eine frage zu const/var/out in aufrufen von prozeduren/funktionen. wenn ich mehrere variablen deklariere eines gleichen typs und diese durch kommata trenne, gilt der parametertyp const/var/out dann für alle variablen?

gemeint ist...
Delphi-Quellcode:
procedure blablupp( const a,b,c:typx)
=
procedure blablupp( const a :typx; const b:typx; const c:typx)
oder
procedure blablupp( const a :typx; b:typx; c:typx)
leider ist die oh dort nicht ganz klar für mich...

grüße

xZise 3. Apr 2007 10:36

Re: const/var/out in Prozeduraufruf
 
Also eigentlich müsste, sollte, dürfte es ersteres sein ;) Ansonsten müsste man ja ungefähr das so schreiben:
Delphi-Quellcode:
const a, const b, const c : typx
;) Und das machste auch nirgends um Variablen zu deklarieren ;)

ibp 3. Apr 2007 10:41

Re: const/var/out in Prozeduraufruf
 
Zitat:

Zitat von xZise
Also eigentlich müsste, sollte, dürfte es ersteres sein ...

geht das präziser als der konjunktiv?

sakura 3. Apr 2007 10:45

Re: const/var/out in Prozeduraufruf
 
1. und 2. sind für den Compiler identisch.

Bei 3. sind Vars 2 u. 3 nach außen CONST und innerhalb der Methode VAR.

...:cat:...

ibp 3. Apr 2007 10:51

Re: const/var/out in Prozeduraufruf
 
Zitat:

Zitat von sakura
1. und 2. sind für den Compiler identisch.

das wars was ich wissen wollte


thx


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:48 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