Hello,
While porting some Delphi code, I found the following two
incomatibility issues. Should I report them as bugs?
Sample 1: It compiles both in Delphi and FPC, but FPC executable fails
at runtime. Delphi inserts temporary string variable and conversion
(array of char - string), but FPC
On Thu, 31 Aug 2006, Sergei Gorelkin wrote:
Hello,
While porting some Delphi code, I found the following two
incomatibility issues. Should I report them as bugs?
Sample 1: It compiles both in Delphi and FPC, but FPC executable fails
at runtime. Delphi inserts temporary string variable and
Sergei Gorelkin wrote:
const
TestData: array[0..7] of Char = 'abc'#10'def'#0;
procedure Test1;
var
sl: TStringList;
begin
sl := TStringList.Create;
sl.Text := string(@TestData[0]); // - fails here
sl.Free;
end;
A typecast is a typecast. Simply remove the typecast, and it
Thursday, August 31, 2006, 12:35:33 PM, Michael wrote:
MVC On Thu, 31 Aug 2006, Sergei Gorelkin wrote:
Hello,
While porting some Delphi code, I found the following two
incomatibility issues. Should I report them as bugs?
Sample 1: It compiles both in Delphi and FPC, but FPC executable
On Thu, 31 Aug 2006, Sergei Gorelkin wrote:
Thursday, August 31, 2006, 12:35:33 PM, Michael wrote:
MVC On Thu, 31 Aug 2006, Sergei Gorelkin wrote:
Hello,
While porting some Delphi code, I found the following two
incomatibility issues. Should I report them as bugs?
Sample 1: It compiles
Op Thu, 31 Aug 2006, schreef Sergei Gorelkin:
What makes a difference is actually TStrings.SetTextStr implementation.
Delphi accesses the argument as null-terminated string, so it works perfectly
well even without conversion. FPC implementation treats argument as
AnsiString, accesses its
Micha Nelissen wrote:
Sample 2: This one compiles with Delphi (again, it inserts necessary
conversion Wide - Ansi), but does not compile with FPC, neither in
objfpc nor in Delphi mode.
The (should be) conversion code seems to be missing.
Never mind this one, I read SetLength instead of