> On Aug 11, 2019, at 3:59 PM, Alexander Grotewohl <[email protected]> wrote:
>
> d.x += 10; // makes even more sense
Ok, you win. Here’s more or less the full snippet.
type
TRectHelper = record helper for TVec4
private
procedure SetAxisX(newValue: TScalar); inline;
public
function MinX: TScalar; inline;
function MinX: TScalar; inline;
property AxisX: TScalar read MinX write SetAxisX;
end;
function TRectHelper.MinX: TScalar;
begin
result := v[0];
end;
function TRectHelper.MaxX: TScalar;
begin
result := v[2];
end;
procedure TRectHelper.SetAxisX(newValue: TScalar);
begin
v[0] += newValue;
v[2] += newValue;
end;
==============================
rect.axisX += 10 is a compound statement. See it makes perfect sense. :) I
still don’t understand why the compiler and Delphi apparently thinks this is
such a crazy idea. It's just normal stuff imo.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal