Hi, Does anyone have a good page and some exercises on the use of pointers? = I am trying to find out why the code below won't compile line 244 I get = invalid operand and failed to generate expression. Thanks char get_credit (void) { char test_string[]=3D"Your balance is =A34.38."; //char *CUSD =3D "AT+CUSD=3D1,*#10#"; char *pnd_point; char *dec_point; int length; char cb [5]; //char pnd=3D'=A3'; //char dec=3D'.'; int credit_pnd; int credit_pence; //puts ("AT+CUSD=3D1,*#10#"); //gsm_gets (rx_array); strcpy (rx_array,test_string); pnd_point =3Dstrchr (rx_array,'=A3'); dec_point =3Dstrchr (rx_array,0x2E); length =3D(pnd_point - dec_point); // line 244 strncpy (cb,(pnd_point+1),(length)); credit_pnd =3D atoi (cb); strncpy (cb,(dec_point+1),2); credit_pence =3D atoi (cb); if (credit_pnd >5) { portb.0 =3D 1; portb.1 =3D 0; } else { portb.0 =3D 0; portb.1 =3D 1; } } -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist