Tag: rtl
Delphi 2009 Language features
Check out this link — pretty much details all the new language features added in Delphi 2009. A big thanks goes to Marco Cantu for preparing this document.
Read More »Thread.Synchronize
A general mistake many Delphi developers are making is accessing GUI classes from other threads directly (in a multi-threaded application). It’s a mistake I was doing for a long time. Eventually I started using SendMessage to synchronize with…
Read More »FastMove: Optimizing System.Move
This post describes a technique that can be used to optimize some RTL functions at run-time. At the end of the post there’s a unit; add it to your uses list (preferably as the first one) and the…
Read More »Abstract methods (or “why not”)
I always considered the implementation of abstract methods in Delphi to be a hack, mostly because there is no way (or is there?) to treat this: “[DCC Warning] W1020 Constructing instance of a class containing abstract method.” warning…
Read More »Overridden method should match case of ancestor
I’ve been following CodeRage III these days and presenter mentioned that in Delphi 7 (and above), when overriding virtual methods, the same case should be used for both functions. Consider this example: In this case indeed the compiler…
Read More »Strings in Delphi (continued)
It seems the more you look, the more you find. There are a few interesting points in how strings are handled in Delphi; I’ve talked before about the particularities of String type in Delphi, so I’ll not touch…
Read More »The Lock keyword
What I miss the most from C# is the lock keyword. Unfortunately Delphi doesn’t (yet) have such a “feature” so we’re stuck making calls to synchronization objects manually. It’s not a big problem actually but can get quite…
Read More »Delphi “Future”
The title is probably a bit misleading. I’m not going to talk about the “future of Delphi” rather about the concept of “future evaluation” in Delphi. You might have heard about the Delphi Prism product that Embarcadero/CodeGear is…
Read More »String reverse tests
This post will be a short one. Just giving a general recommendation for people doing String processing in Delphi – use PChar or ^Char for that. I have made a simple test program that reverses a very big…
Read More »Strings, PChars and reference counting
Hi folks, in today’s post I will continue with reference counting specifics of Delphi in the particular case of Strings. We’ll start with a small example: What will the output of this program be? The obvious result (the…
Read More »