[fpc-devel] Re: Proposal: Enhanced replacement for assignment operators

Alexander Klenin klenin at gmail.com
Fri Aug 6 17:02:11 CEST 2010


On Sat, Aug 7, 2010 at 01:49, Honza <befelemepeseveze at gmail.com> wrote:
> On Fri, Aug 6, 2010 at 21:31, Alexander Klenin wrote:
>>>> As for multiplication, floating-point and overloaded cases,
>>>> they are simply required since Inc and Dec do not work at all.

[...]

>> Sorry, but I do not believe you have ever tried.
>> Here are samples, please try compiling them before asserting that they
>> work fine:
[...]
>
> http://www.freepascal.org/docs-html/ref/refsu5.html#x27-260003.1.1
>
> Inc and friends (Succ, ...) are defined on ordinal types only and
> actually they work just fine. The above examples are outside of that
> definition domain.

Which is exactly what I said in the original email, which both you
and Marco magically forgot to quote ;-)

>Additionally, semantics of Inc is defined using the
>add operation, not using the add/plus operator, iirc.

Of course. Semantics of add/plus is defined in terms of
add operation too, so I'd say that they are equivalent
except Inc/Dec are arbitrarily limited to a subset of types.

-- 
Alexander S. Klenin



More information about the fpc-devel mailing list