I'm not sure whether the devel-list was down when I tried to mail this the first time... so I try again:
> -----Original Message----- > > I think I've found a couple of Delphi incompatibilities in > branch 1.1 (snapshot 09/01/03) (- couldn't find anything in > the buglist) - one compiler related, and one which generates > a runtime-error - see the following source. > > Morten > > > program TestFPC11; > > type > TDoubleArray = array of Double; > TTestProp = > record > TestItem : Double; > end; > TTestPropArray = array of TTestProp; > > TTestClass = > class > private > FTestProp: TTestPropArray; > public > constructor Create; > destructor Destroy; override; > property TestProp : TTestPropArray read FTestProp; > end; > > procedure Init(var AnArray : array of Double); > var > i : Integer; > begin > for i:=0 to High(AnArray) do > AnArray[i] := 1; > end; > > var > Test : TDoubleArray; > i : Integer; > TestClass : TTestClass; > > constructor TTestClass.Create; > begin > inherited Create; > SetLength(FTestProp,2); > end; > > destructor TTestClass.Destroy; > begin > Finalize(FTestProp); > inherited Destroy; > end; > > begin > SetLength(Test,5); > Init(Test); //!!! FPC compile error - Delphi > compiles fine... > for i:=0 to High(Test) do > WriteLn(Test[i]); > Finalize(Test); > > TestClass := TTestClass.Create; > with TestClass.TestProp[1] do //!!! FPC stops with runtime-error > 201 > TestItem := 2; > WriteLn(TestClass.TestProp[0].TestItem); > WriteLn(TestClass.TestProp[1].TestItem); > TestClass.Free; > end. > > > _______________________________________________ > fpc-devel maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/f> pc-devel > _______________________________________________ fpc-devel maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-devel
