Skip to content

8dcc/calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

calc

Emacs-like CLI calculator.

Description

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

Building

$ git clone https://github.com/8dcc/calc
$ cd calc
$ make
...

Usage

You can use the help command to display a list with the available commands:

$ ./calc.out
[calc]: help
...

Example:

$ ./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
$

About

Emacs-like CLI calculator

Resources

License

Stars

Watchers

Forks