Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!ucbcad!zen!cory.Berkeley.EDU!schung From: schung@cory.Berkeley.EDU.UUCP Newsgroups: comp.sys.apple Subject: Re: Re-Reply Message-ID: <2648@zen.berkeley.edu> Date: Tue, 26-May-87 14:11:29 EDT Article-I.D.: zen.2648 Posted: Tue May 26 14:11:29 1987 Date-Received: Wed, 27-May-87 05:07:45 EDT References: <8705242101.aa27497@SMOKE.BRL.ARPA> <2635@zen.berkeley.edu> <2638@zen.berkeley.edu> Sender: news@zen.berkeley.edu Reply-To: schung@cory.Berkeley.EDU (Stephen the Greatest) Distribution: world Organization: University of California, Berkeley Lines: 25 Keywords: C, Ada In article <2638@zen.berkeley.edu> kolding@cory.Berkeley.EDU (Eric Koldinger) writes: > There is one thing that is easy to do in Pascal-type languages that is very >difficult in C. Write readable code. C programs have a tendency to be >extremely wild concoctions of symbols such as: > > x=((fp->_flag&_READ)==0||(fp->_flag&(_EOF|_ERR))!=0); > In C, you can define macros. Your statement can as well becomes: #define or || #define and & #define eof _EOF #define error _ERR #define flag fp->_flag #define read _READ x = ( ( flag and read ) == 0 ) or ( flag and ( eof and error ) ) <> 0 ); For a complicated statement, this is just as clean and as readable as Pascal, Modular 2, Ada will do it. - Stephen