Overloaded operators: Difference between revisions

m
Line 19:
=={{header|ALGOL 68}}==
This overrides the standard integer + operator (as in the F# sample) and provides an overloaded TOSTRING operator.
Also, the + operator is overloaded to operate on an INT left-hand operand and a BOOL right-hand operand.<br>
Though not shown here, it is also possible to change the priorities of existing dyadic operators.
For new dyadic operators, the priority must be specified (though some implementations provide a default).
In both cases this is done with a PRIO declaration.
<lang algol68>BEGIN
# Algol 68 allows operator overloading, both of existing operators and new ones #
3,038

edits