About the author
Are you looking for an example in using Delphi 8's class operators?
Well, the source codes in the RTL had some class operators stuff, but there were no class operator demos shipped with the product.
That being said, I investigated into the issue of that, and the following example was written by me. It's probably the world's first Delphi 8 class operators example, outside of Borland.
Initially, I wanted to write something like
Degree = packed record;
Fahrenheit = packed record(IConvertible) class operator Implicit(AValue: Degree): Fahrenheit;end;
Degree = packed record(IConvertible) class operator Implicit(AValue: Fahrenheit): Degree;end;
But then, I discovered I couldn't declare forward records, just as I could declare forward classes, or forward procedures, collectively known as forward declarations.
That being said, the following is a complete example to using class operators. The example demonstrates converting between degree celsius, degree fahrenheit and kelvin.
The example can be downloaded here.
How to free more space on your home drive by redirecting the location for SDKs in RAD Studio
Learn the command line used to compile System.pas in Delphi
A method to design records so that they're allocated on a specific byte boundary, such as 16 bytes, 512 bytes, 4096 bytes, etc.
Learn why the map is cool in Go!