[fpc-devel] PInteger

Vincent Snijders vsnijders at quicknet.nl
Fri Mar 31 09:46:17 CEST 2006

Recently I was having some troubles using the PInteger type.

PInteger is declared several times in the RTL:
The System unit has
PInteger = ^Integer (two bytes)

The ObjPas unit has
Integer  = longint;
PInteger = ^Integer; (four bytes)

The Types unit has
PInteger = System.PInteger; (two bytes)

The windows unit has:
PInteger = ^Longint;

The math unit (compiled in mode objfpc) has:
PInteger = ^Integer; (four bytes)

IMHO the odd one is PInteger in the types unit, which is only two bytes.

AFAIK, types is a unit also available in Delphi and ^Integer is always a 
pointer to a 4 bytes integer.

Don't you think it is better to remove the PInteger type from the types 
unit, so that PInteger from System or ObjPas is used?


More information about the fpc-devel mailing list