Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. signed char isNumber(unsigned int result)
  2. {
  3. switch(result)
  4. {
  5. case 1: return 1; // 1
  6. case 2: return 2; // 2
  7. case 4: return 3; // 3
  8. case 16: return 4; // 4
  9. case 32: return 5; // 5
  10. case 64: return 6; // 6
  11. case 256: return 7; // 7
  12. case 512: return 8; // 8
  13. case 1024: return 9; // 9
  14. case 8192: return 0; // 0
  15. case 4096: return -1;
  16. default: return -2;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement