a[i].var = e2
and:
a[] = e
in CTFE. (thanks, Don!)auto a = slurp!(int, double)("filename", "%s, %s");
Each line in the file looks like e.g. "1, 2.3". slurp returns an array
of Tuple!(int, double) with the parsed content.
Random r;
foreach (n; take(100, uniform(0, 100))) { ... }
| from | to |
|---|---|
| OutOfMemoryException | OutOfMemoryError |
| SwitchException | SwitchError |
| HiddenFuncException | HiddenFuncError |
| ArrayBoundsException | RangeError |
| AssertException | AssertError |
| FinalizeException | FinalizeError |
| onArrayBoundsError | onRangeError |
| stdc.* | core.stdc.* |
| sys.* | core.sys.* |
| from | to |
|---|---|
| bit | bool |
| _d_OutOfMemory() | onOutOfMemoryError() |
| import std.asserterror; | import core.exception; |
| import std.hiddenfunc; | import core.exception; |
| import std.switcherr; | import core.exception; |
| import std.array; | import core.exception; |
| import std.outofmemory; | import core.exception; |
| import std.gc; | import core.memory; |
| import std.thread; | import core.thread; |
| SwitchError | SwitchException |
| AssertError | AssertException |
| HiddenFuncError | HiddenFuncException |
| ArrayBoundsError | ArrayBoundsException |
| std.gc.fullCollect() | GC.collect() |
| std.gc.*() | memory.gc_*() |
| _moduleUnitTests() | import runtime; runModuleUnitTests() |
| printf | add import std.c.stdio; |