Chapter 6: C Functions and Program Structures
)
s[4]);
onder(char s[], char c)
r i = 5, j = 0;
{
else
{
sendString("Error - Comm");
sendChar(c);
sendString(" received a non integer: ");
sendChar(s[i]);
sendChar('\r');
}
}
sComm[j] = '\0';
if(j>11)
{
sendString("Error - Comm");
sendChar(c);
sendString(" number too large\r");
sendChar('\r');
}
else
{
sendString("\rThank you for sending the number: ");
sendString(sComm);
sendChar('\r');
}
}
}
void Comm3(char s[]
{
responder(s,s[4]);
}
void Comm4(char s[])
{
responder(s,
}
void resp
{
char sComm[11];
unsigned cha
while( (s[i] != '\0') && (j <= 11) )
if( (s[i] >= '0') && (s[i] <= '9') )
{
sComm[j++] = s[i++];
}