An open API service indexing awesome lists of open source software.

https://github.com/reynir/rpn

A proof of concept reverse polish notation calculator that doesn't use pointers.
https://github.com/reynir/rpn

Last synced: 3 months ago
JSON representation

A proof of concept reverse polish notation calculator that doesn't use pointers.

Awesome Lists containing this project

README

        

This is a proof of concept implementation of a simple reverse polish notation
calculator that uses the call stack as operand stack.

[Dan Søndergaard](https://github.com/dansondergaard) gave me the idea. It is
full undefined behaviour, but as long as one gives correct input it should give
correct output.

Currently the supported operators are '+' and '-'. A calculation is terminated by EOF.

Sample usage:

$ echo 3 1 2 + - | ./rpn
0