Tables provide simple look-up tables that can be used by functions in pattern bodies. They have no active behaviour. Tables must be declared in module scope, not inside pattern declarations. Declarations have the following form:
Keys are literal values or expressions involving only literals; values are comma-separated sequences of literal values, or expressions involving only literals.
Tables can have a default value, specified with a key of
Tables are accessed in pattern bodies using square brackets:
For details of dynamic table use from TPL 1.2 onwards, see Table functions