No description
Find a file
2019-01-10 23:38:04 +01:00
.gitignore Basic release.nix 2019-01-10 23:14:54 +01:00
main.c++ Get exercise 1 ready for submission 2017-03-09 16:40:09 +01:00
Makefile Basic release.nix 2019-01-10 23:14:54 +01:00
readme.md Rename readme.rst to readme.md 2017-03-16 12:39:22 +01:00
release.nix Modify release.nix 2019-01-10 23:38:04 +01:00
stack.c++ Get exercise 1 ready for submission 2017-03-09 16:40:09 +01:00
stack.h++ Get exercise 1 ready for submission 2017-03-09 16:40:09 +01:00

                 _    __ _      
 _ __   ___  ___| |_ / _(_)_  __
| '_ \ / _ \/ __| __| |_| \ \/ /
| |_) | (_) \__ \ |_|  _| |>  < 
| .__/ \___/|___/\__|_| |_/_/\_\
|_|

Postfix calculator implemented by Jakob Klepp.

Build

To build postfix just run make.

Usage

The postfix calculator can be started with ./postfix or make run if you want to run postfix with drmemory.

To add a number to the stack, just type it in and press enter.

To perform a calculation, type in the operator (+, -, +, /, %) and press enter. These operators will consume the top two numbers of the stack and put the result back on top.

To display the result, type in = and press enter. This will consume the top number of the stack and display it.

If an operation would try to consume a number but the stack is empty the program will be terminated with a segmentation fault (it's a feature).