Language principles

Peter da Silva peter at ficc.uu.net
Tue Feb 20 01:56:38 AEST 1990


In article <645 at dino.cs.iastate.edu> hascall at cs.iastate.edu (John Hascall) writes:
>  (people who do: #define 2 TWO, #define 3 THREE, ... should be beaten)  ;-)

>    #define N_TERMS 2              ==>   #define N_TERMS 3
>    average = (a + b) / N_TERMS;   ==>   average = (a + b + c) / N_TERMS;

#define AVERAGE(a,b) (((a)+(b))/2)

Sometimes a number is the best thing to use.

It's a judgement call.
-- 
 _--_|\  Peter da Silva. +1 713 274 5180. <peter at ficc.uu.net>.
/      \
\_.--._/ Xenix Support -- it's not just a job, it's an adventure!
      v  "Have you hugged your wolf today?" `-_-'



More information about the Comp.lang.c mailing list