Task

Using two Arrays of equal length, create a Hash object
where the elements from one array (the keys) are linked
to the elements of the other (the values)



Related task

   Associative arrays/Creation


$ include "seed7_05.s7i";
 
const type: numericHash is hash [string] integer;
var numericHash: myHash is numericHash.value;
 
const proc: main is func
  local
    var array string: keyList is [] ("one", "two", "three");
    var array integer: valueList is [] (1, 2, 3);
    var integer: number is 0;
  begin
    for number range 1 to length(keyList) do
      myHash @:= [keyList[number]] valueList[number];
    end for;
  end func;