Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Hash-from-two-arrays/Pascal/hash-from-two-arrays.pas
Normal file
18
Task/Hash-from-two-arrays/Pascal/hash-from-two-arrays.pas
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
program HashFromTwoArrays (Output);
|
||||
|
||||
uses
|
||||
contnrs;
|
||||
|
||||
var
|
||||
keys: array[1..3] of string = ('a', 'b', 'c');
|
||||
values: array[1..3] of integer = ( 1, 2, 3 );
|
||||
hash: TFPDataHashTable;
|
||||
i: integer;
|
||||
|
||||
begin
|
||||
hash := TFPDataHashTable.Create;
|
||||
for i := low(keys) to high(keys) do
|
||||
hash.add(keys[i], @values[i]);
|
||||
writeln ('Length of hash table: ', hash.Count);
|
||||
hash.Destroy;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue