20 lines
269 B
D
20 lines
269 B
D
import std.stdio;
|
|
|
|
void main()
|
|
{
|
|
double[string] table = [
|
|
"one": 1.0,
|
|
"two": 2.0
|
|
];
|
|
writeln(table);
|
|
auto p = "three" in table;
|
|
if (p)
|
|
{
|
|
++*p;
|
|
}
|
|
else
|
|
{
|
|
table["three"] = 3.0;
|
|
}
|
|
writeln(table);
|
|
}
|