> On Jun 2, 2018, at 2:42 PM, Sven Barth via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> It wasn't me who implemented that part. I personally had planned to do it 
> with a warning for existing overloads, but Florian beat me to it and 
> implemented it this way. Though when asked by me he did say that we'll wait 
> and see if people complain... So *maybe* we'll change this.
> 

btw why can’t there be both? You can have multiple + operators for any given 
dynamic array type can’t you?

type
        TArrayOfInteger = array of integer;

operator + (left: TArrayOfInteger; right: integer): TArrayOfInteger;
var
        i: integer;
begin
        for i := 0 to high(left) do
                left[i] += 1;
end;

operator + (left: TArrayOfInteger; right: TArrayOfInteger): TArrayOfInteger;
begin
        result := Concat(left, right);
end;

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to