View Single Post
  #25 (permalink)  
Old April 1st, 2004, 11:27 AM
CNewbie CNewbie is offline
Authorized User
 
Join Date: Mar 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dave:

How is this for the atohex function:

Code:
BYTE atohex(char c)

{
    if(c>='0'&&c<='9') return c-'0';
    if(c>='a'&&c<='f') return c-'a'+10;
    if(c>='A'&&c<='F') return c-'A'+10;
}
Reply With Quote