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


      DIM array1$(4) : array1$() = "0", "1", "2", "3", "4"
      DIM array2$(4) : array2$() = "zero", "one", "two", "three", "four"
 
      FOR index% = 0 TO DIM(array1$(),1)
        PROCputdict(mydict$, array2$(index%), array1$(index%))
      NEXT
      PRINT FNgetdict(mydict$, "3")
      END
 
      DEF PROCputdict(RETURN dict$, value$, key$)
      IF dict$ = "" dict$ = CHR$(0)
      dict$ += key$ + CHR$(1) + value$ + CHR$(0)
      ENDPROC
 
      DEF FNgetdict(dict$, key$)
      LOCAL I%, J%
      I% = INSTR(dict$, CHR$(0) + key$ + CHR$(1))
      IF I% = 0 THEN = "" ELSE I% += LEN(key$) + 2
      J% = INSTR(dict$, CHR$(0), I%)
      = MID$(dict$, I%, J% - I%)