11.1 Introduction

Free Pascal supports operator overloading. This means that it is possible to dene the action of some operators on self-dened types, and thus allow the use of these types in mathematical expressions.

Dening the action of an operator is much like the denition of a function or procedure, only there are some restrictions on the possible denitions, as will be shown in the subsequent.

Operator overloading is, in essence, a powerful notational tool; but it is also not more than that, since the same results can be obtained with regular function calls. When using operator overloading, It is important to keep in mind that some implicit rules may produce some unexpected results. This will be indicated.