alias this and opDot()

Salih Dincer salihdb at hotmail.com
Wed Sep 28 08:09:34 UTC 2022


On Wednesday, 28 September 2022 at 06:39:30 UTC, user1234 wrote:
> opdot is called two times so you reset the state of point 
> members 100

```d
void main()
{
     S s;
     s.x++; /* In this line, it's x = y = 100 firstly, then x = 
101 and 102. */
     s.y++; /* In this line, it's x = y = 100 again, then x = 101 
and y = 101. */

    assert(s.point == Point(101, 101)); // That's ok...
}
```
Thank you...

It seems that I'm as sharp as a tack. 😀

SDB at 79


More information about the Digitalmars-d mailing list