bearophile bearophileh...@lycos.com wrote in message
news:ipq6bd$2211$1...@digitalmars.com...
This gives me compilation errors, is this a bug, or is my code wrong?
import std.stdio;
void main() {
string[char] tab = ['e': red, 'b': blue];
string r;
foreach (c; aba) {
// if
This gives me compilation errors, is this a bug, or is my code wrong?
import std.stdio;
void main() {
string[char] tab = ['e': red, 'b': blue];
string r;
foreach (c; aba) {
// if (c in tab) r ~= tab[c]; // OK
r ~= tab.get(c, ); // ERR
}
writeln(r);
}
Thank