Hello All,
I just want to ask what this programme does. Actually i know what it does, i just wanna know the exact operation of it.
CODE
char *u; //declare the string
char k;
unsigned int x; // declare integer
int i;
u = " University ";
k = u[0];
ASC0_uwGetData(); //wait to get data
x = ASC0_uwGetData(); //get character to the variable
if(x=='u')
{
for(i=0;k!=0; i++) // Read-dynamic way
{
k =u[i];
while(ASC0_ubTxBufFree() == 0) {} //wait untill buffer is not busy
ASC0_vSendData(k); //send Data
}
}
OK what i dont get is the for loop. what does it do exactly with the string(z=p[i])? Is it trying to read the word using the dynamic way? How does it do that?
The programme is supposed to read the u character when its pressed from the keyboard and the extract the word university.. I know its very simple but i'm a beginner...so pls help me!!!!
*Mod Edit: added code tags: