Avoid use of longint and longword #6
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BeRo1985/pucu#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In Delphi LongInt and LongWord are platform dependant types: 32-bit on Windows and 64-bit on Linux, iOS, and Android.
In FreePascal LongInt and LongWord are 32-bit on all platforms. I don't know if this is dependent on Delphi-mode or not.
You probably want to use Integer and Cardinal instead as these are 32-bit on all platforms, regardless of the compiler.
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Simple_Types_(Delphi)#Platform-Dependent_Integer_Types
https://www.freepascal.org/docs-html/rtl/system/longint.html
It appears that you were aware of this when you wrote the code, but got the handling of it reversed:
Regardless, it would be better to just alias the integer and cardinal types.