Go語言入門-常用數據結構之字典map

Go語言入門-常用數據結構之字典map

定義

概述

A map is an unordered group of elements of one type, called the element type, indexed by a set of unique keys of another type, called the key type. The value of an uninitialized map is nil.–字典是一種類型的無序元素組,稱爲元素類型,由唯一鍵(稱爲鍵類型)索引關聯其他類型組成。 未初始化映射的值爲nil。引用類型。

map定義語法

map[KeyType]ValueType
MapType     = "map" "[" KeyType "]" ElementType .
KeyType     = Type .
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章