November 14

On Thursday, 14 November 2024 at 17:27:54 UTC, user1234 wrote:

>

You define a contract that Dscanner does not understand. The more simple solution, as you seem to be careful about bounds, is to disable the specific check that worries you.

Ok. Somewhat sad, but at least it works.
Thanks for all the replies.

November 15
On Thursday, 14 November 2024 at 13:24:47 UTC, Dom DiSc wrote:
> No, no. My problem is:  [...]
So it seems, that the intended problem was transposed into
some example, thereby oblittering that problem with some
coding errors.

> I checked that the source array has at least one element.
Yes, but only for the purpose of the development of the
code, because the used `assert' will probably not be
compiled into a release binary.

[...]
> - What else is proposed to implement the desired effect
> without warning?
Maybe using an `if`-statement, which is propper for release too,
instead of an `assert`-expression, which is propper for
develeopment only?
Please reconsider the docs at 11.19.10.9.1:
https://dlang.org/spec/expression.html#assert_expressions
November 18
On Thursday, 14 November 2024 at 13:08:36 UTC, Manfred Nowak wrote:
> On Saturday, 9 November 2024 at 04:02:46 UTC, Jonathan M Davis wrote:
> [...]
>>     b[0 .. a.length-1] = a[];
>>
>> You'll get a RangeError being thrown when you run the code.
> [...]
>
> Therefore a fix might be to not deminish the length:
>     b[ 0 .. a.length]= a[];
>
> -manfred

Good Lord! Manfred Nowak? Is that really you?!
Everyone, we have the history of D in its full essence, dating back to 2004!

:-P It's great to see you here again, even if only from time to time!
1 2
Next ›   Last »