english@stromboli.usc.edu (Joe English) (12/17/88)
In article <2417@ssc-vax.UUCP> dmg@ssc-vax.UUCP (David Geary) writes: >One of the first things that students in my C class who are reformed >;-) Pascal programmers, want to do is this: > >#define BEGIN { >#define END } > >and a whole slew of other macros to make C look like pascal. > Which, being new C programmers, they don't really know how to do. Just the other day I was helping an incorrigible Pascal programmer debug some C code. She was only using C out of necessity, and had done the following: #define begin { #define end; } Which is not only wrong, but can be wrong in different ways depending on the preprocessor! I really think that it was a bad idea for K&R to mention that this sort of thing is possible. Is their discussion of non-syntactic macros in the 2nd edition, too? /|/| "How do you convince your dermatologist -----< | | that you're being sexually responsible? O \|\| english%lipari@oberon.usc.edu