On Monday, June 5, 2017, Denis Kozlov <dez...@gmail.com> wrote: > I have just created a new GUI application, enabled range checking "-Cr" > and executed the following: > ShowMessage(IntToStr(Form1.BorderSpacing.GetSpace(TAnchorKind(-1)))); > The displayed value is a semi-random integer. No compiler errors or > run-time errors. >
The typecast suppresses a range error in your code. However the LCL method GetSpace should give an error if it is compiled with -Cr. So, build Lazarus + LCL with profile "Debug IDE" and try again. Juha
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel