Browse Source

fix formular parse detection bug again

remotes/origin/Input_Handling
Sophia Weber 11 months ago
parent
commit
f9559e4152
  1. 9
      src/inputHandling.c

9
src/inputHandling.c

@ -83,15 +83,16 @@ char* getnumbers(char* data, int length, calc_op* structure_ref){ //input sind:
token = strtok(NULL, "+"); //Sucht von der letzten Plus-Stelle an weiter
}
structure_ref->arraylength=i; //Länge des Arrays (also zu berechnende Zahlen) gespeichert
if (readFunction(splitPnt, strlen(splitPnt)+1)!=opNotSupported){
return NULL;
} else {
op type = readFunction(splitPnt, strlen(splitPnt)+1);
if (type != opNotSupported && type != opEmpty){
return splitPnt;
} else {
return NULL;
}
}
void printstruct(calc_op* formula){
printf("Berechnung: %s", formula->formel);
printf("Berechnung: %s\n", formula->formel);
switch (formula->funktionstyp) {
case opAdd:
printf("Rechenoperation: Addition\n"); break;

Loading…
Cancel
Save