Understanding range.dropBackOne

Tim tim.oliver at tutanota.com
Tue Sep 28 22:56:17 UTC 2021


I'm doing the following:

```D
int[25] window = 0;

// Later in a loop
window = someInteger ~ window[].dropBackOne;
```

But I'm struggling to understand why the following doesn't work
```D
window = someInteger ~ window.dropBackOne;
```

What does the `[]` do exactly? Is an array not a bidirectional 
range?


More information about the Digitalmars-d-learn mailing list