table constructors now mimic more closely the syntax of case... of...
see the safePrintF example in the manual as a motivation
This commit is contained in:
parent
f8184e3490
commit
92f70b08f9
3 changed files with 47 additions and 7 deletions
|
|
@ -2244,10 +2244,10 @@ Table constructor
|
|||
A `table constructor`:idx: is syntactic sugar for an array constructor:
|
||||
|
||||
.. code-block:: nimrod
|
||||
{"key1": "value1", "key2": "value2"}
|
||||
{"key1": "value1", "key2", "key3": "value2"}
|
||||
|
||||
# is the same as:
|
||||
[("key1", "value1"), ("key2", "value2")]
|
||||
[("key1", "value1"), ("key2", "value2"), ("key3", "value")]
|
||||
|
||||
|
||||
The empty table can be written ``{:}`` (in contrast to the empty set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue