[fpc-pascal] += property bug?
Ryan Joseph
genericptr at gmail.com
Wed Aug 14 20:57:42 CEST 2019
> On Aug 14, 2019, at 2:53 PM, James Richters <james at productionautomation.net> wrote:
>
> I have only used += once; I normally would not use I:=I+1; or I+=1; I would use Inc(I);
Here’s an example of why we like c-style operators, i.e. it reduces redundancy of the variable name. It’s no surprise that programmesr figured out "viewTransform := viewTransform *” could be compressed and still have the same meaning.
viewTransform := TMat4.Identity;
viewTransform *= TMat4.Translate(x, y, 1);
viewTransform *= TMat4.Scale(scale, scale, 1);
or
viewTransform := TMat4.Identity;
viewTransform := viewTransform * TMat4.Translate(x, y, 1);
viewTransform := viewTransform * TMat4.Scale(scale, scale, 1);
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list