[fpc-pascal] Re: fpc-pascal Digest, Vol 87, Issue 13

Ingemar Ragnemalm ingemar at ragnemalm.se
Sun Sep 11 12:08:10 CEST 2011


From: Marcos Douglas <md at delfire.net>
> Subject: Re: [fpc-pascal] Overloading the increment operator (+=)
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Message-ID:
> 	<CA+ixmeZZ9r2EiUzqJ-F2=hTUGyUNKYWhY_729JfYuofqyiif9A at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> 2011/9/10 Flávio Etrusco <flavio.etrusco at gmail.com>
>   
>> Hello,
>> If write a declaration without result it complains about invalid
>> syntax; if I add a result it says "impossible operator overload".
>> Does FPC allow overloading the += operator? If not, why?
>>     
>
> You do not need overload the += operator, just do it in := operator.
>
> Marcos Douglas
>   

I don't think the question was whether it was necessary, but whether it 
was possible. When you use += a lot for scalars, it is a bit annoying 
when I can't do the same for vectors.


/Ingemar




More information about the fpc-pascal mailing list