
int getdec(unsigned char dpoint, unsigned char alwneg, unsigned char angent)
// dpoint, alwneg, and angent are flags that are not implemented yet
{
// local variables
int decimal;		// return value
int temp;		// temporary value
int key;
...
...
...


	key = 0;
	while (key == 0)
		{
		key = getkey();        // get key code from keypad
		}
...
a switch/case statement assigns the correct numeric value to 'key'
...
	if ((key >= 0) & (key <= 9))            // if key is numeric
		{
		putchar(key + 48);		// display ascii value
		temp = temp * 10 + key;		// tally it
                }
return(temp);
}
