I haven't found any valuable online resources. I learnt everything through the help file. Atm it doesn't work but searching for operator overloading with filter set to language: delphi you should find what you need.
if you need a list of operators available to overload then heres a shortened list which is contained in my Tvector4f record:
Code:
class operator add(a,b: tvector4f): tvector4f;
class operator add(a: tvector4f; b: single): tvector4f;
class operator add(a: single; b: tvector4f): tvector4f;
class operator Subtract(a,b: tvector4f): tvector4f;
class operator Subtract(a: tvector4f; b: single): tvector4f;
class operator Subtract(a: single; b: tvector4f): tvector4f;
class operator Multiply(a,b: tvector4f): tvector4f;
class operator Multiply(a: tvector4f; b: single): tvector4f;
class operator Multiply(a: single; b: tvector4f): tvector4f;
class operator Divide(a,b: tvector4f): tvector4f;
class operator Divide(a: tvector4f; b: single): tvector4f;
class operator Divide(a: single; b: tvector4f): tvector4f;
class operator Equal(a,b: tvector4f): boolean;
class operator NotEqual(a,b: tvector4f): boolean;
class operator Implicit(a: tvector4f): string;
If you use operator overloading for classes then you'll have to create the result yourself
Bookmarks