![]() |
AW: Ist das ein Pattern?
Zitat:
Assigned überprüft nicht, ob irgendwelcher Müll in dem Methodenzeiger steht, sondern nur ob er ungleich nil ist. |
AW: Ist das ein Pattern?
Zitat:
Delphi-Quellcode:
var
X: TNotifyEvent; if Assigned(X) then Beep; if (TMethod(X).Code <> nil) or (TMethod(X).Data <> nil) then Beep; |
AW: Ist das ein Pattern?
Ich fass nochmal zusammen:
Zitat:
Zitat:
Delphi-Quellcode:
if @x <> nil then
Beep |
AW: Ist das ein Pattern?
Hab grade was Neues gelernt. :shock:
Delphi-Quellcode:
X := nil;
if @@X <> nil then Beep; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:09 Uhr. |
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