Associative array/Creation: Difference between revisions
→{{header|langur}}
m (→{{header|Wren}}: Changed to Wren S/H) |
Langurmonkey (talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 3,933:
Hash keys in langur may be numbers or strings. Number keys are simplified, so that 1.0 is the same key as 1.
<syntaxhighlight lang="langur">var .hash =
# may assign with existing or non-existing hash key (if hash is mutable)
Line 6,035:
=={{header|Sidef}}==
<syntaxhighlight lang="ruby">var hash = Hash
key1 => 'value1',
key2 => 'value2',
)
# Add a new key-value pair
hash{:key3} = 'value3'
=={{header|Slate}}==
|