I tried writing to an associative array and got the exception:
[EMAIL PROTECTED](15): Array index out of bounds
the program below causes the exception:
module test;
import tango.io.Stdout;
import tango.io.Console;
struct S {uint i;}
int main()
{
S[char[]] s;
s["test"].i = 1;
Stdout.format("Done!").flush;
return 0;
}
But the program below works fine:
module test;
import tango.io.Stdout;
import tango.io.Console;
struct S {uint i;}
int main()
{
S[char[]] s;
S t;
t.i = 1;
s["test"] = t;
Stdout.format("Done!").flush;
return 0;
}
Am I supposed to be able to do both methods, or is the second the only possible
way? Some explanation would be very helpful.
Thanks for your time,
Zane