Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!fernwood!portal!cup.portal.com!Joe_W_Wright From: Joe_W_Wright@cup.portal.com Newsgroups: comp.lang.c Subject: Re: Bit Masking Question Message-ID: <43614@cup.portal.com> Date: 24 Jun 91 18:09:57 GMT References: <12191@hub.ucsb.edu> Organization: The Portal System (TM) Lines: 14 All characters will fit your three stated cases, therefore the printf() is not even reachable. Try this. #define RMASK 0xc0 #define FMASK 0x80 switch (c & RMASK) { case RMASK : do1(); break; case FMASK : do2(); break; default : do3(); } Should work everywhere. Joe Wright