A simple command line calculator
- GNU Readline
- getopt.h
Windows:
Compile with Visual Studio
Arch Linux/Manjaro:
Install cmdcalc
with package manager
Linux:
Compile with CMake
- Expressions (
1 + 2 - 3 * a ** f(42 / 2)
) - Variables (
a=99
) - Functions (
func f(x)=x*2
) - Arrays (
arr=append(arr, 32, "Hello World", ["another array"])
)
- + Addition
- - Subtraction
- * Multiplication
- ** Power
- / Division
- = Assignment
- condition ? true : false
- vars (list variable names)
- funcs (list function names)
- CTRL+D exit
- CTRL+C discard command
- func name(param1, param2)="definition"
- Implement file execution
- Add useful command-line options
- Add Documentation/Wiki
- Find and fix bugs
- Add more functions
- Add complex statements (like if, for)