Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
begin
|
||||
var zoo := new Dictionary<string,integer>;
|
||||
zoo['crocodile'] := 2;
|
||||
zoo['jiraffe'] := 3;
|
||||
zoo['behemoth'] := 1;
|
||||
zoo.Println;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue