Hello everybody ,
this is my new program I want to show you :)/>
What is it ?
As you probably could already guess it is a … calculator ! Yep that´s it :D/>
How does it work ?
The special thing about this calculator is, that it is able to handle anything you throw at it as long as it consists of any of the standart operators + , - , * , / , ^ !!
Brackets are possible aswell !
Basically what my program does is :
It turns the input math expression into a Queue of tokens ( numbers,brackets and operators ) then turns those into a Queue of tokens in reverse polish notation( thanks to Wikipedia and their pseudocode :D/> ) and then evaluates this Expression !
Internally I am using a class api to create classes for Queues and Stacks which are needed in the process of turning the infix math expression into a RPN expression.
Currently the GUI of this program is … well not existant :D/>
After finishing the crucial parts of the program I was too lazy to create a nice GUI but I will probably look into that in the near future.
So currently the program will just ask you to enter your math expression you want to solve and will then print the ( hopefuly correct ) result
To install simply run:
pastebin run ebWSYVTq
It will create the following files :
Class.lua -> The previously mentoined class api
Classes.lua -> The file containing the Stack class and the Queue class
Calculator -> The actual program you can run afterwards !
Screenshot:
Spoiler
http://imgur.com/ODDrss4Spoiler
GUII hope you like it !
Kouksi44