Chapter 3. Do some math

Table of Contents
3.1. More about stacks
3.2. A little more math

The next thing to learn is how to do some simple math, for example, write a program to print the result of 1+2. Here is an example of how to 1 and 2 together and to print the result:

Example 3-1. Evaluating 1 + 2

Program Listing

1 2 add print

Program Output


What does that mean? And why does it work?