On Saturday, 5 October 2024 at 17:26:59 UTC, Steven Schveighoffer
wrote:
It’s the semicolon. As soon as the closing brace, the
declaration is over. You would have to invent new syntax.
Maybe type tuple syntax will support this:
```d
struct EntityDef
{
(int hp) stats;
}
EntityDef ed;
int x
On Thursday, 3 October 2024 at 12:23:27 UTC, Holzofen wrote:
```d
uint64 sod_decompose(const uint64 n, const uint64 mod,
const ref uint64[] primes, const ref uint64[uint64][uint64]
factorials)
{
auto result = factorials[n];
for (uint64 k = 2; k < n - 1; k++) {
float computeToFitInWindow(uint rows, uint cols)
{
// code removed ...
writeln(hexWidth);
return hexWidth;
}
unittest
{
assert(computeToFitInWindow(1, 1) == 2.0f, "This assert
failed");
assert(computeToFitInWindow(3, 3) == 0.8f, "This
On Sunday, 6 October 2024 at 21:09:22 UTC, WhatMeWorry` wrote:
float computeToFitInWindow(uint rows, uint cols)
{
// code removed ...
writeln(hexWidth);
return hexWidth;
}
unittest
{
assert(computeToFitInWindow(1, 1) == 2.0f, "This assert
fai
On Sunday, 6 October 2024 at 10:53:28 UTC, Nick Treleaven wrote:
On Thursday, 3 October 2024 at 12:23:27 UTC, Holzofen wrote:
[...]
Could anybody point me to a way how to make a straight copy
without meddling with the source array?
You can copy an AA using `dup`:
https://dlang.org/phobos/ob