On Fri, 7 Apr 2017, African Wild Dog wrote:

2017-04-07 12:10 GMT-03:00 Michael Van Canneyt <mich...@freepascal.org>:


NativeInt and NativeUInt are indeed provided for Delphi compatibility.

Which integer type to chose : That depends. What do you want to achieve
exactly ?


In Delphi, if i want an integer type which depends on the target platform
(32 or 64 bits) i can use the NativeInt and NativeUInt types. What is the
FPC standard type for this? PrtInt and PtrUInt? (I usually mix both delphi
mode and objfpc mode units in the same project).

You can use PrtInt and PtrUInt for this or NativeInt and NativeUINT, they
should be equivalent.

The only 'dubious' case may be the 8086 msdos case, which is somewhat confused
about what exactly constitutes a pointer... There you may be better off with NativeInt and NativeUINT.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to