Should it really be possible to assign a constant to a pointer?
Original Reporter info from Mantis: Armand Jordaan
-
Reporter name: Armand Jordaan
Original Reporter info from Mantis: Armand Jordaan
- Reporter name: Armand Jordaan
Description:
I have been a Delphi user for quite some time, and have recently moved to Freepascal as an alternative.
For me the problem is that Freepascal allows the following:
proc anyproc;
var
x : pointer;
begin
x := $400000; // in Delphi this will give an error
end;
In issue 0014232: "Overload the obsolete Ptr function?" , it has been mentioned that the use of Ptr is obsoleted. Surely the Ptr function should be kept exactly to rather allow programmers to assign x in a statement like:
x := Ptr($400000)
Mantis conversion info:
- Mantis ID: 14713
- OS: Windows XP
- Platform: x86
- Version: 2.2.2
- Fixed in version: 2.6.0
- Fixed in revision: 13919 (#fffa66e2)