.. highlightlang:: us .. index:: Overview Map, Map .. _overview-map: Overview Map ============ A map is a collection that associates a key name with a matrix. The matrix is either a string matrix, a real matrix or a complex matrix. Unlike a Container (see :ref:`overview-container`) the matrix is not accessed through an index (1,2,3,...) but by a key name like "Engine", "Test", etc. .. us.example **Example** :: hMap = MapCreate(); MapSetAt(hMap, "Mot-No12", ["1,6l", "4 Valves", "74kW"]); MapSetAt(hMap, "Mot-No432", ["2.0l", "4 Valves", "100kW"]); MapSetAt(hMap, "Mot-No42", ["2.5l", "4 Valves", "115kW"]); MapSetAt(hMap, "Mot-No132", ["3.0l", "4 Valves", "150kW"]); ssKey = "Mot-No42"; svMotData = MapLookup(hMap, ssKey); if (ObjGetOk() == FALSE) { MessageBox(sprintf("Key \"%s\" not found", ssKey)); return FALSE; } sprintf("The engine has %s" svMotData[3]); .. us.makeindex Map, Create and Destroy .. include:: ../ftab/Map.ftab .. us.makeindex Map_Set, Set .. include:: ../ftab/Map_Set.ftab .. us.makeindex Map_Get, Get .. include:: ../ftab/Map_Get.ftab .. seealso:: :ref:`functions-by-categories` :sub:`id-630667`