AA init

bearophile bearophileHUGS at lycos.com
Mon Mar 17 10:36:11 PDT 2008


lurker, this works:

import std.stdio: writefln;

struct Hashtag {
    string vr;
    string ret;
    string name;
}

void main() {
    Hashtag[string] tags = ["(0002,0000)": Hashtag("UL","N","Group Length")];
    writefln(tags["(0002,0000)"].name);
}

You may want to define tags inside a static this {}.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list