Byron Jeff wrote: > On Wed, Apr 09, 2014 at 01:19:18PM -0400, Dave Tweed wrote: > > Byron Jeff wrote: > > > I remember the separator/terminator difference from Pascal. Used to d= rive > > > me nuts. Reason is the inconsistency. Terminators, while annoying, ar= e > > > consistent. > >=20 > > Technically, the semicolon is a statement *seaparator* in C, too. >=20 > Nope. This is not correct. You can see the difference when you have one > statement in a block and more that one. Yes, it is correct. > In C (one statement): >=20 > if (test) > i =3D 1; Which could also be written: if (test) i =3D 1; > In C (more than one statement): >=20 > if (test) { > i =3D 1; > j =3D 2; > } Which could also be written: if (test) { i =3D 1; j =3D 2 } or even: if (test) { i =3D 1; j =3D 2 } All of this is possible becuase ';' is a separator, not a terminator. In your example, the compound statement (inside the braces) has three statments, the third of which is null. In both of my examples, it has just two statements. Of course, we all write compound statements in the style of your example, and we don't need to worry about adding or removing that last semicolon specifically because C allows null statements. End-of-line has no significance whatsoever in the syntax of C. It's just whitespace. However, EOL *is* significant in preprocessor statements and in C++ style '//' comments. -- Dave Tweed --=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 .