Path: utzoo!attcan!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!oberon!skat.usc.edu!blarson From: blarson@skat.usc.edu (Bob Larson) Newsgroups: comp.lang.c Subject: style wars Keywords: style Message-ID: <14128@oberon.USC.EDU> Date: 18 Dec 88 09:07:54 GMT Sender: news@oberon.USC.EDU Reply-To: blarson@skat.usc.edu (Bob Larson) Organization: USC AIS, Los Angeles Lines: 25 Since this flamefest has come up again, I thought I would contribute something I consider more readable than the "standard" representation. Null statements are sometimes useful in C, mainly as loop bodies. Some people use semicolon on a line by itself for the null statment. I prefer a pair of braces: for(p = FIRST; p->next != NULL; p = p->next) ; looks strange to me, and takes two vertical lines. for(p = FIRST; p->next != NULL; p = p->next) {} uses a special two character sequence to denote the null statement, and takes only a single line. (Vertical space is limited on the terminals I use to read and edit programs, when comparing programs or looking at an insert file, only 11 lines of the function are visable.) -- Bob Larson Arpa: Blarson@Ecla.Usc.Edu blarson@skat.usc.edu Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson Prime mailing list: info-prime-request%ais1@ecla.usc.edu oberon!ais1!info-prime-request