Hi *,
seems, that overloading of Inc, Dec internal compiler procedures
is not
allowed.
Is it by intention or can it be fixed (adding overload keyword to
system
function definitions?).
Yes, this is by intention and no, it can't be fixed.
Thank you!
Can it be th
LacaK schrieb am Mi., 18. Sep. 2019, 13:38:
> Hi *,
>
> seems, that overloading of Inc, Dec internal compiler procedures is not
> allowed.
> Is it by intention or can it be fixed (adding overload keyword to system
> function definitions?).
>
Yes, this is by intention and no, it can't be fixed.
Hi *,
seems, that overloading of Inc, Dec internal compiler procedures is not
allowed.
Is it by intention or can it be fixed (adding overload keyword to system
function definitions?).
I would like to add support for:
procedure Inc(var a: integer; b: single); overload; inline;
begin
a
Work-around which produces good assembler without writting/reading
intermediate variables:
class function T2DPoint.Sqr(value: T): T; static; inline;
begin
Result := value*value;
end;
function T2DPoint.Distance(P: T2DPoint): Single; inline;
begin
Result := Sqrt(Sqr(x-P.x) + Sqr(y-P.y));
end;
Hi *,
I have generics record, where one method computes distance between 2 points:
function T2DPoint.Distance(P: T2DPoint): Single;
begin
Result := Sqrt(Sqr(x-P.x) + Sqr(y-P.y));
end;
But this does not compile as there are many versions of Sqr() in the
scope Sqr(longint), Sqr(QWord), Sqr(Ext