== vs. = a final word

Rafael Llave llave at phoenix.Princeton.EDU
Fri Apr 1 16:54:49 AEST 1988


When I started programing in C -having programmed in
Fortran and Pascal , I made mistakes with the comparisons.

What I did is to include in my file "macros.h" -always included in
my programs -

#define EQ ==
#define LEQ <=

etc.

One of the advantages of C is that you do not
need to get tied by the grammar. K&R themselves
suggest 

#define BEGIN {
#define END }

for enthusiasts of the notation



More information about the Comp.lang.c mailing list