Autor Beitrag
coder24h
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mo 29.05.06 11:43 
Wie kann ich den Routine anschließend verlassen? mit result springe ich aus der Methode raus?
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 29.05.06 11:47 
Was meinst du mir Routine? Die If-Anweisung?

_________________
Markus Kinzler.
coder24h Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mo 29.05.06 11:50 
ich meine eine Funktion verlassen
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 29.05.06 11:51 
ausblenden Delphi-Quelltext
1:
Exit;					

_________________
Markus Kinzler.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 29.05.06 11:52 
Du meinst vermutlich eine Function.
Die Zuweisung eines Wertes an Result beendet nicht die Function. Hat den Vorteil, dass man Result wie eine Variable verwenden kann.
Wenn du eine Function vorzeitig beenden willst, nimmst du exit. Ist imho zwar unsauberer Stil (bitte jetzt keine OT-Diskussion), aber zulässig. Du solltest Result aber vorher einen Wert zugewiesen haben. Sonst wird das Funktionsergebnis undefiniert.
coder24h Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mo 29.05.06 11:54 
super! Danke Schön!