As of October, 2016, Embarcadero is offering a free release
of Delphi (Delphi
10.1 Berlin Starter Edition ). There
are a few restrictions, but it is a welcome step toward making
more programmers aware of the joys of Delphi. They do say
"Offer may be withdrawn at any time", so don't delay if you want
to check it out. Please use the
link to let me know if the link stops working.
Support DFF - Shop
If you shop at Amazon anyway, consider
using this link.
We receive a few cents from each
Support DFF - Donate
If you benefit from the website, in terms of
knowledge, entertainment value, or something otherwise useful,
consider making a donation via PayPal to help defray the
costs. (No PayPal account necessary to donate via credit
card.) Transaction is secure.
For over 15 years
Mensa Page-A-Day calendars have provided several puzzles a year
for my programming pleasure. Coding "solvers" is most fun,
but many programs also allow user solving, convenient for "fill
in the blanks" type. Below are Amazon links to the
two most recent years.
365 Puzzlers Calendar 2017
365 Puzzlers Calendar 2018
(Hint: If you can
wait, current year calendars are usually on sale in January.)
e-mail with your comments about this program (or anything else).
November 24, 2013: I
recently upgraded from Delphi 7 to Delphi XE5. Since the DFF audience
appears to be approximately evenly split between "D7 and earlier" and "after D7"
users, I'll try to support for both early and later versions where possible.
Regardless of whether you need multiple version support, there are differences
which will require source code changes after the upgrade.
Differences & Considerations:
This section will document
differences as I find them. It is not always documented exactly which
version of Delphi first implemented a feature or change, but most language
syntax changes seem to have appeared shortly after D7. For my conditional
compilation tests, I'm assuming the changes apply after D7 (Compiler
version >15) unless I know otherwise. If you discover an item in the list
where that does not apply, please use the
feedback link to let me know.
Format Settings: Beginning
with XE (Compiler version 22), the date/time formatting variables
previously embedded in the SysUtils unit now exist within a FormatSettings
SysUtils. The record is TFormatSettings type and contains date, time, and
number formatting information which may change depending where you live. So if your program previously referenced "ThousandSeparator"
for example, it must now reference FormatSettings.ThousandSeparator.
Check library unit UBigIntsV4 for an example.
UInt64 (Unsigned 64 bit
integer type): This is a language enhancement which allows true 64
bit integers (up to 264 -1) to be manipulated. Int64
integers reserve 1 bit for the sign so the maximum value is 263
-1. This became a consideration when creating a Random64 function
suitable for pre and post D7 compilers. Check the library
unit Mathslib source code for an example.
Issues with multiple Delphi compiler
versions on the same system:
I currently have a few problems
running D7 after installing XE5.
If a form defined in XE is then
compiled with D7, you may encounter "Undefined property errors" for new
properties. Assuming that these new properties have not been
referenced in the program, they may be safely ignored. I have options
set to generate text version of forms by default which was necessary for
transferring to the free Lazarus Delphi emulator. It may be a
requirement for XE forms also.
If the "Save Desktop" option is
set XE, D7 hangs when trying to start. Cause unknown, but
removing or renaming the ".dsk" file generated by XE allows D7 to
start. Still being investigated.
Similarly, D7 produces a message
at startup concerning the "Just in Time" debugger file being invalid.
Replying "Yes" to then "change option" question causes an "unable to
change" error and a hang. Replying "No" allows D7 to start OK but
without debugging facilities. Still being investigated.
Delphi 10.1 Berlin -
Delphi 7 Differences (November 2016)
Embarcadero is currently offering
Delphi 10.1 Berlin as a free download which has increased the interest in
upgrading Delphi 7 code. A viewer recently converted our Akerue program
which ran but failed to find words. The problem turned out to be the bs.
Delphi 7 use of single 8 bit characters for String data types vs.
the use of Unicode 16 bit characters for String types in current Delphi
versions including Delphi 10.1. The dictionary creation and
accessing routines in our UDict unit use ANSI string types and I am not willing
to double dictionary sizes by converting to to wide characters.
The alternative was to modify the accessing routines to specify ANSIString
The updated Udict is included in the
DFFLibV14_12Nov2016 library zip file.
The method I have adopted to ensure
program compatibility with both old and new Delphi versions Is to change all
references to "String" data type in the source code to "ANSIString".
"Char: character types are now also 2 byte WideChar types.
Simply adding the type definition "Char=ANSIChar" in a form's
Type definition section will resolve most problems caused by the definition
After these changes, there may be
statements that still cause compilation errors if the are compiled under a newer
Delphi version and create controls which generate string data types,
TStringList and TStringGrid, for example. The controls
will generate Wide character strings and may require recasting to ANSI strings
if using character indexing when referencing, for example.
The Dicmaint dictionary maintenance
program along with the seven programs contained in
WordStuff3 application have been
converted as described above to compile and run successfully under old and
new Delphi versions. Some "nuisance" problems were encountered,
New properties exists for some
controls causing Delphi 7 to complain when loading the project;
ExplicitHeight and ExplicitWidth can be safely ignored in most
cases. However if controls have Autosize or Align/AlClient
properties set, D7 may hang when loading the program. My solution so
far has been to change those properties.
Default Font property
values seem to have changed under Berlin, contributing to some readability
and scaling problems. Don't have a recommended solution yet except to
change values back to the ones I want. If there is a way to
change default property values under Berlin, I have not found it yet.
Under the Berlin compiler, right
clicking a form and selecting the "Text DFM" option will save the .DFM form
files as readable text; very convenient when analyzing differences between
Because executables under newer
Delphi versions are several times larger larger than D7, I will be uploading
only D7 executables unless the newer version is required. Source
modules will remain compatible across versions if possible.
Compiler conditionals testing compiler version numbers are always possible
but require knowledge of when incompatible compiler changes were introduced
- not a fun way to spend a day!
|Created: November 24, 2013
July 29, 2017