I wrote some code using RTTI and for some reason I was getting odd results. Couldn’t figure out what was the problem and I wasn’t able to debug since teh application was deployed on another machine.
So, I took out the new rtti-ed code and made a small test project just to see that there is an error in the delphi help file.
they say, at storage specifiers that
[code:1:7cde22346f]
Note
You can’t use the ordinal value 2147483648 has a default value. This value is used internally to represent nodefault.
[/code:1:7cde22346f]
the value is actually -2147483648, and using the constant, the compiler will for some reason complain of
[Error] unitname.pas(line number): Overflow in conversion or arithmetic operation
which is kind of stupid since that value is actually the low end of integer, so the workaround is to use low(integer) instead of that.
❗