Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,29 +0,0 @@
// arr is an array of string to int. any type can be used in both places.
var keys: domain(string);
var arr: [keys] int;
// keys can be added to a domain using +, new values will be initialized to the default value (0 for int)
keys += "foo";
keys += "bar";
keys += "baz";
// array access via [] or ()
arr["foo"] = 1;
arr["bar"] = 4;
arr("baz") = 6;
// write auto-formats domains and arrays
writeln("Keys: ", keys);
writeln("Values: ", arr);
// keys can be deleted using -
keys -= "bar";
writeln("Keys: ", keys);
writeln("Values: ", arr);
// chapel also supports array literals
var arr2 = [ "John" => 3, "Pete" => 14 ];
writeln("arr2 keys: ", arr2.domain);
writeln("arr2 values: ", arr2);