
上QQ阅读APP看书,第一时间看更新
Complex types
We can build complex types from primitive and other composite types with the help of the following:
- Structs: The elements within the type can be accessed using the DOT (.) notation.
- Maps (key-value tuples): The elements are accessed using the ['element name'] notation.
- Arrays (indexable lists): The elements in the array have to be in the same type. You can access the elements using the [n] notation where n is an index (zero-based) into the array.