Zack Noble & Connor Plunkett
In terminal run the line ghc baseCalc -o baseCalc
Next run ./baseCalc.exe
The program will prompt the user with “Enter your input:” By default the program runs in base 10 you can give the program variables and do basic arithmetic operations.
For Example Enter your input: x:=3 Enter your input: y:=2 Enter your input: x+y
There are different commands that you can enter into the program at any time:
exit/:q -- Quits the program
vars -- Displays the current values of the variables
help -- Gives the listed commands
CurrentBase -- Displays the current base the program is running in
Base -- Prompts the user to enter a new base for the program to be ran in
You can change the base of the calculator using the Base function and entering in a base, this will make the program require the user to enter digits in the specified base.
Variables We recommend using only lowercase letters when making variables.
Base Entries If in base 16 for example and you have a digit that is represented by a letter use a capital letter Example: F1A