i am reciving the gps packet for serial port and written code like as below. rxbuf[100]="081417.138,A,1728.6091,N,07833.8230,E,0.00,49.52,280306,,,A*5E"; main() { sscanf(&RxBuf[0],"%lf,%c,%lf,%c,%lf,%c,%lf,%lf,%lf",&time,&valid,&latnow,&latnowdir,&lonnow,&lonnowdir,&speed,&course,&date); if(valid=='A') { here write my code; } } this program will give correct outpu in debugging but it can not work practically. slove this problem any body knows about this.