Last active
March 29, 2018 14:06
-
-
Save H4niz/30c6960f4dcb8719971ef1120cfd404a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int get_expr(int *NumberArray) { | |
while ( ( read(0, &bufChar, 1)) != 0 && index < MaxSize ) { | |
if ( bufChar != 0x0a ) { | |
if ( bufChar == '+' || bufChar == '-' || bufChar == '*' || bufChar == '%' || bufChar >= 0x2F/* / */ && bufChar <= 0x39 /* 9 */) { | |
NumberArray[index++] = bufChar; | |
} | |
} | |
else { | |
NumberArray[index] = 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment