Difference between revisions of "Dot syntax"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "Dot syntax refers to a way of indexing into a map by putting the key after the map reference, joined by the ''dot operator''. For example, instead of <c>myMap["entry"]</c>, w...")
(No difference)

Revision as of 03:54, 18 January 2021

Dot syntax refers to a way of indexing into a map by putting the key after the map reference, joined by the dot operator. For example, instead of myMap["entry"], with dot syntax you would write myMap.entry.

The key must be a valid MiniScript identifier, that is, it must begin with a letter, and contain only letters, numbers, and underscores.