look here
Code:
char testMethod()
{
BYTE tempxte[10];
BYTE ch;
int i=0;
while((ch=WaitRx())!=',') //WaitRx()
//WaitRx() reads in a char at a time
{
tempxte[i]=ch;
i++;
}
return *tempxte;
}
void parseAPB(){
skipComma(1); //sentence delimeted by commas
//skipcomma skips 1 comma in sentence
*apb.warningFlag = testMethod();
printline(apb.warningFlag);
printline(",");
}
you are returning a pointer from the testMethod function.
***but look the return type of the function testMethod its is char instead of char***3
Code:
char * testMethod()
{
BYTE tempxte[10];
BYTE ch;
int i=0;
while((ch=WaitRx())!=',') //WaitRx()
//WaitRx() reads in a char at a time
{
tempxte[i]=ch;
i++;
}
return *tempxte;
}
void parseAPB(){
skipComma(1); //sentence delimeted by commas
//skipcomma skips 1 comma in sentence
*apb.warningFlag = testMethod();
printline(apb.warningFlag);
printline(",");
}