On Thursday, 30 January 2020 at 21:36:53 UTC, Adam D. Ruppe wrote:
On Thursday, 30 January 2020 at 21:09:41 UTC, Simon wrote:
How do I revert my variable to the init state?
null is the initial state for those.
More generally, .init can be used as to get the initial state for
any type.
ie.
On Wednesday, 1 February 2017 at 13:37:27 UTC, Suliman wrote:
Class constructor accept only set if fields like
this(string login, string pass)
Can I create structure, fill it, and than pass to constructor?
Like this:
```
import std.stdio;
struct ConnectSettings
{
string login;
On Wednesday, 22 February 2017 at 11:18:15 UTC, Martin
Tschierschke wrote:
On Tuesday, 21 February 2017 at 14:02:54 UTC, Jacob Carlborg
wrote:
[...]
Yes, this works, I would say this is the simplest:
MyStruct s;
foreach (index, name ; FieldNameTuple!MyStruct)
writefln("%s: %s", name, s.tu
On Saturday, 25 February 2017 at 01:27:09 UTC, Minty Fresh wrote:
On Wednesday, 22 February 2017 at 11:18:15 UTC, Martin
Tschierschke wrote:
[...]
Since structs are Plain-old Data and don't do inheritance, the
best option is a template mixin.
ie.
template mixin PrettyPrint
{
stri
On Tuesday, 28 February 2017 at 18:16:45 UTC, Anton Pastukhov
wrote:
On Tuesday, 28 February 2017 at 17:16:43 UTC, Daniel Kozák
wrote:
V Tue, 28 Feb 2017 15:15:00 +
Anton Pastukhov via Digitalmars-d-learn
napsáno:
I can't see the logic in AA foreach order. Consider this code:
...
Output: