Hi,
I'm not a programner, but I often need to read some code.
And here I'm always confused with the varable declarations.
When you say "integer" variable ... are you sure it is a signed_int_32 (are you sure it is not any other bit width ... and not unsigned)
When you say "longint" variable ... are you sure it is a signed_int_64 (are you sure it is not any other bit width ... and not unsigned)
If possible I recommend to declare the variables unambiguously.
Because the compiler need to treat the "cast" differently.
Klaus