NO, I said ALL would generate an error but not all would generate a warning= .. I also said "C Type", referring to scripting languages as well as compilers= .. On 12 March 2012 12:18, Tamas Rudnai wrote: > On 12 March 2012 09:20, Chris Roper wrote: > > > I agree with your colleague. > > I use several compilers and several "C Type" languages, not all of them > > will give a warning but all will generate the error. > > > > You mean if you write: > > if ( 0 =3D x ) ... > > then not all C compiler will generate an error? > > Tamas > > > > > > > > On 12 March 2012 10:03, Jim wrote: > > > > > I have a colleague who insists on using this reverse syntax > > > > > > if(0 =3D=3D x) { > > > ...do stuff > > > } > > > > > > which I find odd to read at the best of times... > > > > > > We're using embedded C, (Hitech), and whilst > > > if(x =3D0) doesn't throw an error, it does throw a warning. > > > > > > oh well. > > > > > > -Jim > > > > > > > > > > > > > > > > > > > > > > Isn't that just what warnings are for? It compiles OK but it might > not > > be > > > > what you wanted. Just like: > > > > > > > > if (A=3DB){ > > > > ... > > > > > > > > > > > > > > > > > > > -- > > > http://www.piclist.com PIC/SX FAQ & list archive > > > View/change your membership options at > > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > -- > > http://www.piclist.com PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > > -- > int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; > printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", > q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .