Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-03

PInteger

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

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?

Vincent.

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 24 lines
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.

This is correct.

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?

Yes.

Michael.

Reply by email