Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/8dcc/calc

Emacs-like CLI calculator
https://github.com/8dcc/calc

Last synced: 4 days ago
JSON representation

Emacs-like CLI calculator

Awesome Lists containing this project

README

        

#+title: calc
#+options: toc:nil
#+startup: showeverything
#+author: 8dcc

*Emacs-like CLI calculator.*

#+TOC: headlines 2

* Description
Simple stack-based CLI calculator made in C. Decided to start this project the day I discovered emacs' =calc= (=C-x * i=).

* Building

#+begin_src console
$ git clone https://github.com/8dcc/calc
$ cd calc
$ make
...
#+end_src

* Usage
You can use the =help= command to display a list with the available commands:
#+begin_src console
$ ./calc.out
[calc]: help
...
#+end_src

Example:
#+begin_src console
$ ./calc.out
[calc]: 8
[stk+00] 8

[calc]: 20
[stk+00] 8
[stk+01] 20

[calc]: 2
[stk+00] 8
[stk+01] 20
[stk+02] 2

[calc]: /
[stk+00] 8
[stk+01] 10

[calc]: +
[stk+00] 18

[calc]: q
$
#+end_src