Data update

This commit is contained in:
Ingy döt Net 2024-07-13 15:19:22 -07:00
parent 29a5eea0d4
commit 5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions

View file

@ -1,12 +1,12 @@
var .hash = h{1: "abc", "1": 789}
var h = {1: "abc", "1": 789}
# may assign with existing or non-existing hash key (if hash is mutable)
.hash[7] = 49
h[7] = 49
writeln .hash[1]
writeln .hash[7]
writeln .hash["1"]
writeln h[1]
writeln h[7]
writeln h["1"]
# using an alternate value in case of invalid index; prevents exception
writeln .hash[1; 42]
writeln .hash[2; 42]
writeln h[1; 42]
writeln h[2; 42]

View file

@ -0,0 +1,7 @@
begin
var zoo := new Dictionary<string,integer>;
zoo['crocodile'] := 2;
zoo['jiraffe'] := 3;
zoo['behemoth'] := 1;
zoo.Println;
end.