Handling of dynamic array as pointer
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
The following code compiles and works fine in Delphi, but gives an error in FreePascal when
assigning a dynamic array to a pointer variable.
var
p : Pointer;
a : array of Integer;
begin
SetLength(a, 10);
p := a; <-- Error: Incompatible types: got
"Array Of SmallInt" expected
"Pointer"
Additional information:
Reporter: Frank Kintrup
EMail: frank dot kintrup at gmx dot de
Mantis conversion info:
- Mantis ID: 5288
- OS: Win32
- Version: 1.9.5
- Fixed in version: 1.9.5