[fpc-pascal] How to get rid of hint?

Mattias Gaertner nc-gaertnma at netcologne.de
Sat May 20 22:21:41 CEST 2006


I want to compute the offset/difference between two pointers. But I didn't
found a way to do that without compiler hints.

unit1.pas(42,6) Hint: Conversion between ordinals and pointers is not
portable

var
  p1, p2: pointer;
  i: PtrInt;
begin
  ...
  i:=PtrInt(p1)-PtrInt(p2);
  ...
end;

Any idea, how to get rid of the hint?

Mattias



More information about the fpc-pascal mailing list