why $ is need to access array [negative index]?
mipri
mipri at minimaltype.com
Fri Sep 18 21:19:43 UTC 2020
On Friday, 18 September 2020 at 21:14:19 UTC, mw wrote:
> On Friday, 18 September 2020 at 21:11:58 UTC, Steven
> Schveighoffer wrote:
>> Well, if you don't care about verbosity.
>>
>> signs[(sign + $) % $] = ...;
>
> I want compiler writes this verbosity, instead of the user :-)
It's not free, and not always desirable. This code would silently
accept sign=100 for example.
More information about the Digitalmars-d
mailing list