Special thanks to Scott Hein and Ali Hussain, who were excellent group members. I extracted the core logic from an old group project of ours for this application.
Micro is an infix calculator. The tool is a console with a frustratingly unnecessary language. Simply put, it's just a calculator with severe usability issues. According to a friend, it's like a butcher knife with no handle.
You simply type commands, which will produce calculations, store or retrieve variables, etc. The calculator is stateful, meaning that you can create variables for use throughout a single session.
The tool is case insensitive, and you can substitute [brackets] wherever you see (parentheses).
Commands take between 0-2 parameters.
A parameter for an operation can be other functions, so long as the function returns a value (i.e., not set or clear).
Any numeric parameter can be a decimal or a fraction. See fract for more information.
Simple arithmetic operations:
The following shows some inputs and outputs.
add(1,2) > 3 subtract(1,2) > -1 set(car,fract(1,2)) > done subtract(2,val(car)) > 3|2 set(die,rand(1,7)) > done val(die) > 3 sqrt(val(die)) > 1.4142135623731
There are no valid use cases for this toy.