Regarding goto: Here is a piece of code from the demo app for the TCP/IP stack from Microch= ip: ... // Read all browser POST data while(curHTTP.byteCount) { // Read a form field name if(HTTPReadPostName(curHTTP.data, 6) !=3D HTTP_READ_OK) goto ConfigFailure; =09 // Read a form field value if(HTTPReadPostValue(curHTTP.data + 6, sizeof(curHTTP.data)-6-2) !=3D = =20 HTTP_READ_OK) goto ConfigFailure; //some more test cases here which all jumps to ConfigFailure on failure } // do something if all is ok here return HTTP_IO_DONE ConfigFaulure: // Do something else on failure here return HTTP_IO_DONE } =09 Of course this could be handled without goto but it seems like a good way t= o=20 handle this with a goto here. I guess it all depends on how the goto is use= d. /Ruben >=20 > Just to claim a bit of authority, I get paid to write code in C (and C++, > C#), including embedded code (it's a while since I've done any with PICs = so I'll > leave the rest of the questions to others) and have been writing C for 25= years. > I don't think I have ever used a goto in C - there is always some other w= ay > which will almost certainly result in better code structure. I don't have= coding > standards in front of me at the moment, but I'm sure they would say that = goto > statements are not allowed - using one would doubtless fail the first pee= r > review. If you feel you have to use one, then maybe you need to consider = how > good the structure of your code is. >=20 > John is correct that I would also have no idea of the syntax involved in > using a goto - to be honest I'd pretty much forgotten they even existed. >=20 > Yes of course if you are writing assembly you have to use goto statements > as there is no other choice, but even there I'm writing my code structure= d > in such a way that goto statements are simply being used to create loops > (like a for loop) or exit loops (like a while statement), and it helps a > lot if you do write code in an organised way like that rather than flying > control all over the place. >=20 > Challenge for anybody - show me a bit of C code which needs to have a got= o > statement which couldn't be better coded without one... >=20 > Chris > --=20 > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist >=20 >=20 > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2014.0.4355 / Virus Database: 3722/7306 - Release Date: 04/05/14 >=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124 200 39 Malm=F6 Sweden Tel +46 40142078 ruben@rjjournal.net =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .