Enumerations: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) (Added Arturo implementation) |
|||
Line 129: | Line 129: | ||
writes 0, 1, 2 to the console. |
writes 0, 1, 2 to the console. |
||
=={{header|Arturo}}== |
|||
<lang rebol>enum: [apple banana cherry] |
|||
print "as a block of words:" |
|||
inspect.muted enum |
|||
enum: ['apple 'banana 'cherry] |
|||
print "\nas a block of literals:" |
|||
print enum |
|||
enum: #[ |
|||
apple: 1 |
|||
banana: 2 |
|||
cherry: 3 |
|||
] |
|||
print "\nas a dictionary:" |
|||
print enum</lang> |
|||
{{out}} |
|||
<pre>as a block of words: |
|||
[ :block |
|||
apple :word |
|||
banana :word |
|||
cherry :word |
|||
] |
|||
as a block of literals: |
|||
apple banana cherry |
|||
as a dictionary: |
|||
[apple:1 banana:2 cherry:3]</pre> |
|||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |