Search:

Type: Posts; User: comocomocomo

Search: Search took 0.00 seconds.

  1. Replies
    19
    Views
    3,154

    You don't need it in any other function, and...

    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...
  2. Replies
    19
    Views
    3,154

    Yes, but this doesn't help, since 'state' is an...

    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,...
  3. Replies
    19
    Views
    3,154

    puts ( strchr("aeiouy",lett) ? "vowel" : ...

    puts ( strchr("aeiouy",lett) ? "vowel" :
    lett>='a' && lett<='m' ? "consonant not after m" :
    lett>'m' && lett<='z' ? "consonant after m" :
    ...
  4. Replies
    19
    Views
    3,154

    I don't know where is the bottleneck, but... ...

    I don't know where is the bottleneck, but...


    First, you can reorganize this:




    key = 0;
    if ((adc > 205) && (adc < 235 )) key = 1;
Results 1 to 4 of 4