Dot syntax

From MiniScript Wiki
Revision as of 03:54, 18 January 2021 by JoeStrout (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.