> On Jun 2, 2018, at 5:19 AM, Nitorami <mneuba...@alice-dsl.net> wrote: > > Are you serious ? I have been using dynamic arrays a lot for processing of > vectors and matrices containing floating point values, and implemented the + > operator to do the obvious, add the elements of two vectors, NOT to concat > them. This is just natural for floating point vectors, similar as with other > basic mathemetical operators as *,-, /. > Even if the "+" has always been used to concat strings, I find it a really > really bad idea to extend that to danymic arrays.
Why are you using dynamic arrays for vectors/matricies? If what you have is an actual array you wish to grow then + would likely be an append operation. var v: TVec2; begn v := V2(1,1); v += 10; // add 10 to x/y and get: v = 11,11 var v: array of float; begn SetLength(v, 1); v[0] := 1; v += 10; // append 10 and get : v = 1,10 Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal