I am having a problem when I try to manipulate chars
like =C7 or =C0.

CharPtr car;
int     caracteres[255];
Int32   indice;
Int32   cedilha;
...
indice =3D *car;
if (indice < 255) {
    caracteres[indice]++;
}else{
    cedilha =3D *car;
}
...


The problem is my text has =C7 and =C0 so I need to get these ... But I can't using ASCII code... How can I do this!? The =C7 is the code 128 in ASCII, but I can't put him in the variable indice... anybody knows why?

It's not clear from your description what the problem is, but one guess is that the character referenced by *car is being sign-extended when you copy it to cedilha. So any character with a value > 0x7F (127) will be copied to cedilha as 0xFFFFFFxx. You'd want the line to be


cedilha = *(unsigned char *)car;

-- Ken
--
Ken Krugler
<http://www.krugler.org>
+1 530-265-2225

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to