Associative array/Creation: Difference between revisions
Content added Content deleted
(→{{header|LOLCODE}}: Add implementation) |
(Add SenseTalk implementation) |
||
Line 3,547: | Line 3,547: | ||
end for; |
end for; |
||
end func;</lang> |
end func;</lang> |
||
=={{header|SenseTalk}}== |
|||
Associative arrays in SenseTalk are called property lists, or objects. |
|||
<lang sensetalk>put {} into emptyPlist |
|||
put an empty property list into emptyPlist2 |
|||
put {first:"Albert", last:"Einstein"} into Einstein |
|||
set Einstein's occupation to "Physicist" |
|||
put 1879 into Einstein.yearBorn |
|||
put "!!!" after the occupation of Einstein |
|||
put Einstein |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
{first:"Albert", last:"Einstein", occupation:"Physicist!!!", yearBorn:1879} |
|||
</pre> |
|||
=={{header|SETL}}== |
=={{header|SETL}}== |