Autor Beitrag
Desert Storm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: So 11.02.07 15:26 
Hi,
kann man eine Procedure oder eine Funktion schreiben, bei der nur optional Parameter erwartet werden?
Das nur ein bestimmter Teil vom Code abgearbeitet wird, wenn ein bestimmter Parameter übergeben wird.
Danke schonmal für die Antwort.
MFG
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 11.02.07 15:34 
Du kannst bei Prozeduren/Funktionen optionale Parameter angeben. Sie müssen nur einen Defaultwert erhalten und müssen in der Parameterliste hinten stehen.
ausblenden Delphi-Quelltext
1:
procedure MyProc(aInteger: Integer; aString: String; OptParam: Integer = -1);					

_________________
We are, we were and will not be.