Stack-based language: Difference between revisions

Content deleted Content added
NatusRoma (talk | contribs)
m compu-stub
No edit summary
Line 1:
In [[computer science]], a '''stack-based language''' is a [[computer language]] that uses the stack to store intermediate results during computation. [[Forth]] isand an[[Java exampleprogramming language|Java]] [[byte-code]] and examples.
 
A stack-based language tends to be used as intermediate representation of a program during its compilation.
 
== Example ==
 
A piece of code to compute the sum of 10 + 20 would be like:
 
<pre>
push 10 // push 10 onto the stack
push 20 // push 20
add // pop two values from the stack, and push its sum
</pre>
 
{{compu-stub}}