On Sat, 01 Oct 2011 09:06:05 +0100 Martin <[email protected]> wrote:
> On 01/10/2011 08:13, Mattias Gaertner wrote: > > On Sat, 1 Oct 2011 10:08:59 +0300 > > Zaher Dirkey<[email protected]> wrote: > > > >> Off your topic > >> On Sat, Oct 1, 2011 at 9:53 AM, Mattias Gaertner > >> <[email protected]>wrote: > >> > >>> "Assigned" is used instead of "FOnClick<>nil" > >> > >> What is different between check the Method fields ? > >> "Assigned(FOnClick)" and "FOnClick<>nil" > > http://wiki.lazarus.freepascal.org/IDE_tricks#Events_.28Method_properties.29_in_the_Object_Inspector > > > > > Strange, on the page it says: > > if OnMyEvent<> nil then OnMyEvent(...);// wrong, because it checks Data > > too > > > if OnMyEvent = NewValuethen exit;// wrong, because it compares only Code > > So I compiled (to assembler) 32 bit: > > Comparison with nil (expect to check code + data, as told above) > Comparison with other method (expect code only) > > But in both cases it tests one long entry (testl or cmpll). so the same > amount of data. It doesn't look that <> nil checks code+data? You are right. It seems it was changed in the compiler. I will update the wiki. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
