Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-09

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

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ingemar Ragnemalm

From: Marcos Douglas

Show quoted text 18 lines
Subject: Re: [fpc-pascal] Overloading the increment operator (+=) To: FPC-Pascal users discussions Message-ID: Content-Type: text/plain; charset=UTF-8 2011/9/10 Flávio Etrusco > 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

Reply by email