IBM AS/400E Network Router User Manual


 
private int hexValue(char c)
{
int rc;
switch(c)
{
case '1':
rc=1;
break;
case '2':
rc=2;
break;
case '3':
rc=3;
break;
case '4':
rc=4;
break;
case '5':
rc=5;
break;
case '6':
rc=6;
break;
case '7':
rc=7;
break;
case '8':
rc=8;
break;
case '9':
rc=9;
break;
case 'a':
case 'A':
rc = 10;
break;
case 'b':
case 'B':
rc = 11;
break;
case 'c':
case 'C':
rc = 12;
break;
case 'd':
case 'D':
rc = 13;
break;
case 'e':
case 'E':
rc = 14;
break;
case 'f':
case 'F':
rc = 15;
break;
default:
rc=0;
break;
}
return rc;
}
92 Web Programming Guide V4R5