[fpc-pascal] Loss of precision when using math.Max()
Ralf Quint
freedos.la at gmail.com
Tue Jul 3 22:25:37 CEST 2018
On 7/3/2018 10:41 AM, Martok wrote:
>>> If you compile with range checks on, you get a runtime error.
>> why are so many folks NOT developing with all the checks (range, heap, stack,
>> etc) turned ON and then turning them off for production builds???
> Actually, while we're at it - it seems to me that for FPC, "all runtime checks
> enabled" is the "defined" way to use the language, and disabling them is more of
> an optimization that the programmer may choose?
> In books about TP and Delphi, it is usually presented the other way around, the
> checks being a debugging tool for edge cases and not essential.
>
> If so, that'd explain some of the issues people have.
>
Exactly, Pascal by and large assumes that you develop with all checks
enabled. Which is something that people also should do in other
languages, like C, which do have those options. However, too many people
just turn all the checks off, because they feel bothered by the all
warnings that the compiler gives them where they are programming in a
very ambiguous and possibly dangerous way.
Speed kills...
Ralf
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the fpc-pascal
mailing list