Borland claims that 'simply recompiling' your existing code will normally cause no problems. But reality shows that there is quite a number of problems you might encounter; a few of these are mentioned in docs somewhere, but others are mentioned nowhere.
| Bug # | Delphi versions | Description |
| 255 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
See separate section for a piece of code that works fine under Delphi 1, but not under Delphi 2.01. It's very hard to say in what category this bug falls, probably it's the VCL |
| 256 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
There is an undocumented difference between how Delphi 1's Readln handles error conditions and how Delphi 2 and 3 do that |
| 257 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Delphi 2 adds a statement Application.Initialize to generated .DPR code. Delphi 1 .DPR's don't have this statement; the statement must be added 'by hand', otherwise problems may occur |
| 258 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
The constant LR_LOADREALSIZE seems to have disappeared |
| 259 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
(16 bit) Resource files from Delphi 1 are not accepted by Delphi 2. One must convert them to 32 bit (which isn't difficult, by the way) |
| 260 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Unit names longer than 8 characters cause problems |
| 261 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Performance of database applications in Delphi 1 is much better than in Delphi 2. |
| 262 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Some event types have been changed between Delphi 1.0 and 2.0. |
| 263 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
The declaration of ReportEventA (Windows.pas) has changed |
| 264 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
The base value of TDateTime variables has changed between Delphi 1.0 and 2.0. |
| 438 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Delphi 2 complains when loading forms that were saved with Delphi 3; Delphi 3 does the same with forms created in Delphi 4 (etc?). |
| 395 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
D1 - D2 -
SysUtils The implementation of FileExists has changed: In Delphi 1 it supported wildcards; in Delphi 2 and later it doesn't anymore. |
| 456 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
D3 to D4 -
property TDataSet.Fields has become read-only |
Bug #255; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Gotcha | Gotcha | N/A | N/A | Unknown | Unknown | Unknown | Unknown |
Michael ends his message with:
In short, then, something(s) got quite screwed up in the translation
from 16 to 32 bits, and I haven't a clue as to what it is or what the best
way around it might be; and part of the reason I'm letting you in on this
now is that neither does Borland technical support, and they've been looking
at it (??) for a week or so.
If you or the Bug List's readers can figure out what's going on, I'd
certainly be thankful -- and it's probably a terrific bug, too!
So, Delphi'ers around the world: who beats this challenge?
Bug #256; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Gotcha | Gotcha | N/A | N/A | Unknown | Unknown | Unknown | Unknown |
program _01read;
uses
sysutils
{$ifdef ver80}
,wincrt
{$endif}
;
var
i,j : integer;
infile : text;
begin
assign(infile,'_01read.dat');
reset(infile);
while not eof(infile) do
begin
{$i-} readln(infile,i,j); {$i+}
if ioresult <> 0 then
writeln('Error reading line')
else
writeln('Read values ',i:3,j:3);
end;
readln;
close(infile);
end.
; 1 1 2 2 3 3 ; 4 4 5 5 6 6
Error reading line Read values 2 2 Read values 3 3 Error reading line Read values 5 5 Read values 6 6
Error reading line Read values 1 1 Read values 2 2 Read values 3 3 Error reading line Read values 4 4 Read values 5 5 Read values 6 6
Bug #258; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha |
Bug #260; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Gotcha | Gotcha | N/A | N/A | Unknown | Unknown | Unknown | Unknown |
Bug #261; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Gotcha | Gotcha | N/A | N/A | Unknown | Unknown | Unknown | Unknown |
Bug #262; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Gotcha | Gotcha | N/A | N/A | Unknown | Unknown | Unknown | Unknown |
Bug #263; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha |
function ReportEventA(hEventLog: THandle; wType, wCategory: Word; dwEventID: DWORD; lpUserSid: Pointer; wNumStrings: Word; dwDataSize: DWORD; lpStrings, lpRawData: Pointer): BOOL; stdcall;From delphi 2.x windows.pas:
function ReportEventA(hEventLog: THandle; wType, wCategory: Word; dwEventID: DWORD; lpUserSid: Pointer; wNumStrings: Word; dwDataSize: DWORD; var lpStrings: PAnsiChar; lpRawData: Pointer): BOOL; stdcall;The parameter lpStrings was "var" in D2 and not in D3.
Bug #264; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Gotcha | Gotcha | N/A | N/A | Unknown | Unknown | Unknown | Unknown |
Bug #438; last modified: 22-Jul-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha |
Bug #395; last modified: 13-Apr-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha |
function MyFileExists(FileMask: TFileName): boolean;
const
CST_FileAttr:Word=faAnyFile-faVolumeID-faDirectory;
var
SearchRec :TSearchRec;
begin
Result:= FileExists(FileMask);
If not Result then
begin
Result:= FindFirst(FileMask,CST_FileAttr,SearchRec)= 0;
SysUtils.FindClose(SearchRec);
end;
end;{MyFileExists}
Bug #456; last modified: 11-Aug-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | N/A | N/A | N/A | N/A | Gotcha | Gotcha | Gotcha |
property Fields[Index: Integer]: TField read GetField write SetField;In Delphi 4's db.pas, this reads as follows:
property Fields: TFields read FFields;Besides that this property has become read-only, the type has also been changed. The new type TFields has another property Fields which more or less plays the role of the old Fields property, but this one is also read-only:
property Fields[Index: Integer]: TField read GetField; default;So in old code, occurrences of Fields[xxx] must be replaced with Fields.Fields[xxx]. And if you were assigning to it, you're still stuck.