Thanks!  That got rid of that error, but a new one occurs.  My modified code is:

...
        if (StrStr(StrToSearch, "$GPGGA") != NULL) {
                 
                UInt16 pGPSStr = StrStr(StrToSearch, "$GPGGA") - StrToSearch;
                UInt16 bufLen = StrLen(StrToSearch);
                WChar ch = 0;
                UInt8 CommaCount = 0;

                while ((pGPSStr < bufLen) && (CommaCount < 6)) {
                pGPSStr += TxtGetNextChar(StrToSearch, pGPSStr, &ch);
                    if (ch = ",") 
                        CommaCount++;
                        else {          
                            switch (CommaCount) { 
                                case 0:
                                        StrCat(GPSData.GPSID, ch);
                                        break;
...

I decided to make sure that StrStr did not return a NULL before processing.  
But my error occurs at the If and the StrCat statements.

At 'if (ch = ",")', I get: warning: assignment makes integer from pointer 
without a cast

At 'StrCat(GPSData.GPSID, ch)', I get: warning: passing arg 2 of `StrCat' makes 
pointer from integer without a cast

More of the same problem or at least similar, for whatever reason ch is an 
integer(???) and can't be compared to or used as a string character?  This is 
very frustrating and just doesn't relate to any programming I have ever done 
before. 

Basically, what I want to do is create a new string made up of the pieces I 
pull from the original string.  So, how do I check if the current character, 
which I thought was being returned to ch, is of a  match and then if it isn't 
add that character to the subsequent string?

Thanks very much for your help!!
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to