[fpc-pascal] Platform Dependent Integer Types

African Wild Dog paintedlycaon at gmail.com
Fri Apr 7 17:44:27 CEST 2017


2017-04-07 12:33 GMT-03:00 Michael Van Canneyt <michael at freepascal.org>:

>
>
> On Fri, 7 Apr 2017, African Wild Dog wrote:
>
> 2017-04-07 12:10 GMT-03:00 Michael Van Canneyt <michael at 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.
>
>
Thank you for the clarification.

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170407/a747d7ae/attachment.html>


More information about the fpc-pascal mailing list