Variables: Difference between revisions

m
Line 2,519:
 
The JOY stack can be initialized:
<syntaxhighlight lang joy=Joy>[] unstack</langsyntaxhighlight>
 
'''Assignment'''
 
Values can be pushed on the stack:
<syntaxhighlight lang joy=Joy>42</langsyntaxhighlight>
pushes the value 42 of type integer on top of the stack.
 
Line 2,530:
 
Calling the stack by name pushes a copy of the stack on the stack. To continue the previous example:
<syntaxhighlight lang joy=Joy>stack</langsyntaxhighlight>
pushes the list [42] on top of the stack. The stack now contains: [42] 42.
 
153

edits