Operator
An operator is a special type of method that at run-time introduces or modifies how a primitive operates. For example:
operator * (Left:String; Right:Int32): String; begin Result := ''; for 1 to Right do Result := Result + Left; end;The code above modifies Modern Pascal that String now has the ability to multiply. Making the following code valid:
varOutput:
str:String;
Begin
str:='abc' * 3;
Writeln(str);
end.
abcabcabc