If instead done like: if (NULL =3D=3D (file_handle=3Dfopen(stuff))) ... the single =3D error would automatically be checked at compile time. Of cou= rse, = this only works if one of the comparees is a constant. /Ruben > >Similarly when dealing with pointers, I fine the "one line" > >much more understandable, i.e.: > > > >if ((file_handle=3Dfopen(stuff)) =3D=3D NULL) > >printf ("File open failed!"); > >else > > /* do c stuff with file */ > > > >This is personal opinion though. > > > >All I'll add, is despite how "dangerous" some people claim C > >is, it's extremely wide spread use seems to indicate that the > >danger level is acceptable. > = > I suspect there are two things here about figuring that the danger level = is > "acceptable" > = > 1. Any good C programmer will recognise the dangers of the construct > = > 2. Many C programmers would run the program by one of the many versions o= f Lint > to make sure they don't have any stupid typos that they have missed (like= a > single =3D before the NULL). > = > -- = > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > = > = > = > -- = > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 2007-03-= 26 > 14:31 > = =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 INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =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 -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist