Hello together,
The following compiles and executes correctly in objfpc mode (and rejected by Delphi and by FPC in
mode Delphi). Is implicit taking address of array there by design?
type
PReal = ^Real;
const
xa: array[0..3] of Real = (1.0,2.0,3.0,4.0);
procedure test(x: PReal);
begin
writeln(x[3]);
end;
begin
test(xa); // prints 4.0e+0
end.
Regards,
Sergei
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel