> Here is an odd bit of C code.... > Do you think it is legit ? yes, why not? > switch (n) > default:: > if (isprime(n)) > case 2: case 3: case 5: case 7: p = 1; > else > case 4: case 6: case 8 case 9: : p=0; > > If it is, what on earth does it do? compute whether n is prime > (and why!) it speeds up the prime-check for < 10, and defers the check for >= 10 to isprime(), without using extra 'return' statements. This makes sense only if the objective is to minimise the number of return statements. Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist