Getting Started

(lily) #1

Chapter 8: C Pointers and Arrays


< 5; i++)
endFString(ENTER);
+ i);
(FOR);

}


) // 5 error messages
showMessage(s[0]);

acter
[0])
:
=='e')&&(s[2]=='m')&&(s[3]=='o')&&(s[4]=='?') )
dFString(WHO_DEMO);
reak;
1);
sendChar(s[0]);
sendFString(BAD_COMMAND2);

0';
}

d sh

&mess);
R_TBL[num]); // Send the song title to the PC

inal you will see:

to the 'Messenger' demo.

for(int i = 0; i
{
s
sendChar(c
sendFString
sendFString(ERROR_TBL[i]);
}


void parseInput(char s[])
{
if( (s[0] <= '4') && ( s[0] >= '0')
{


}
else
{
// parse first char
switch (s
{
case 'd'
if((s[1
sendFString(TALKING_TO);
sen
b
default:
sendFString(BAD_COMMAND


break;
}
s[0] = '\


}


voi owMessage(char mess)
{


int num = atoi(


sendFString(ERRO


}


Compile, load to the Butterfly, and in HyperTerm


You are talking

Free download pdf