staticcharbackspaceText[BUFFER_SIZE+1];// Pretty dumb waste of memory because only backspace characters, used with send_string to backspace and remove input
staticchartext[BUFFER_SIZE+1]={[0]='0'};// Used to store input and then output when ready to print
staticunsignedcharinputLocation=1;// Current index in text input
staticchartext[BUFFER_SIZE+1];// Used to store input and then output when ready to print
staticunsignedcharinputLocation=0;// Current index in text input
doublecalc(charinput[])// Finds value of input char array, relatively small and fast I think
{
charinputToken[BUFFER_SIZE+1];// Input buffer, used when a single token (generally a number) takes up more
unsignedcharinputTokenLocation=0,inputLocation=0;// Keep track of indices
structTokentokens[BUFFER_SIZE];// Input, converted to tokens
structTokentokens[BUFFER_SIZE+1];// Input, converted to tokens, one extra large to accomodate for possible negative sign then open parenthesis as first character
unsignedchartokenCount=0;// Keep track of index
booldashAsMinus=false;// Kind of a hacky solution to determining whether to treat a dash as a minus sign or a negative sign
@ -164,10 +167,19 @@ double calc(char input[]) // Finds value of input char array, relatively small a
while(inputLocation<BUFFER_SIZE)
{
shortnumber=input[inputLocation]-'0';// Using a short here because both signed char and unsigned char would overflow, potentially