dlang-book/02-основные-типы-данных-выр.../src/chapter-2-3-11/app.d

21 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);
}