You don't need it in any other function, and global variables are bad. Leave it local but make it static. It will live like a global variable (whole program execution lifespan, initialized only...
Type: Posts; User: comocomocomo
You don't need it in any other function, and global variables are bad. Leave it local but make it static. It will live like a global variable (whole program execution lifespan, initialized only...
Yes, but this doesn't help, since 'state' is an automatic local variable, which gets initialized to 0 every time the processor enters the function. If the compiler follows the rules of the language,...
puts ( strchr("aeiouy",lett) ? "vowel" :
lett>='a' && lett<='m' ? "consonant not after m" :
lett>'m' && lett<='z' ? "consonant after m" :
...
I don't know where is the bottleneck, but...
First, you can reorganize this:
key = 0;
if ((adc > 205) && (adc < 235 )) key = 1;