I know dwscript has operator overloading for compound operators +=
etc.
I would like to have operator overloading for +
, -
etc as well for use in addition, multiplication etc. of matrix objects.
And if so what this the syntax do overload an operator?
As of last week, binary operators overloading is supported and tested, both script-side (user-specified operator overloading) and Delphi-side (built-in operator overloading).
For the syntax, see here and there.
精彩评论