Programming Delphi for Various Platforms and Versions
Delphi has come a long ways since it was first released in 1995. It now compiles 32-bit or 64-bit, still creates console or Windows applications but now also can create Android and iOS apps if you have the FireMonkey library and cross-platform tools, you can create Android and iOS apps.
There are a lot of compiler directives that can be used in your code to selectively compile different sections of code depending on the platform or options being used. There are also symbols defined for each version of Delphi.
Many years ago, to test some of these symbols before I found clear documentation like the links given above, I wrote a program to list out the symbols defined when compiled under different versions of Delphi, and later added other conditional symbols to list out other capabilities of the executing environment. I recently revisited this program, pulled all the compiler directives out of the main form into a generic unit, and added a couple new applications using this new unit to the project group. I have put this set of programs up on GitHub under the name DelphiVersions on the off-chance someone might find it useful.
As of the date of this writing, these compile and have been tested under Delphi 7, Delphi 2007, Delphi XE, Delphi XE2, Delphi XE4, Delphi XE8, and all versions after that up to and including Dephi 10.3 Rio. The projects included are:
- Windows Console 32/64-bit
- Windows VCL 32/64-bit
- Windows FireMonkey 32/64-bit
- Android FireMonkey 32-bit
Here are some screen shots: