Stack-based language: Difference between revisions

Content deleted Content added
No edit summary
Line 5:
== Example ==
 
A piece of code to compute the sum of 10 +* (20 + 30) would be like:
 
<pre>
push 10 // push 10 onto the stack
push 20 // push 20
push 20 // push 30
add // pop two values from the stack, and push its sum
mul // pop two values from the stack, and push its sum
</pre>