[fpc-pascal] Loss of precision when using math.Max()

Ralf Quint freedos.la at gmail.com
Tue Jul 3 18:41:22 CEST 2018


On 7/3/2018 5:01 AM, Santiago A. wrote:
> El 03/07/2018 a las 01:26, Jim Lee escribió:
>>
>> Without the implicit conversion of signed/unsigned values, the
>> utility of the language is greatly diminished.
Bollocks! Just learn to program in Pascal, not trying to have Pascal act
just like another compiler/language....
>
> Let's be honest, compared to C and many other languages (included C++,
> that is a suicide without extra-language analyzer tools), Pascal is
> very type secure. For instance, many languages allow assigning a float
> to an integer without any problem. Moreover without being clearly
> specified by language definition what the compiler should do, truncate
> or round.
>
> Pascal needs to break backward compatibility to advance, that is, in
> fact, a new language. But if pascal is struggling to survive, let
> alone a new language if you are not mozilla, google...
Again bollocks!

If you have properly range check enabled, you get an exception at those
code samples. Such for code samples (all variables of the same type,
Byte in the examples), the compiler can not make a determination at
compile time (and we have a compiler here, not just another interpreter,
like Python, etc ).

And no "new language" can absolve the programmer from properly doing
their work. Everything else is just a quick hack, not a properly
designed program...

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