Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site wateng.UUCP Path: utzoo!watmath!wateng!ksbszabo From: ksbszabo@wateng.UUCP (Kevin Szabo) Newsgroups: net.lang.c Subject: Re: C-Debug package ... (a la "context-independent macros") Message-ID: <1924@wateng.UUCP> Date: Tue, 29-Jan-85 14:07:53 EST Article-I.D.: wateng.1924 Posted: Tue Jan 29 14:07:53 1985 Date-Received: Wed, 30-Jan-85 04:16:13 EST References: <1885@wateng.UUCP> <1089@hcrvx1.UUCP> <33@daisy.UUCP> <1097@hcrvx1.UUCP> Reply-To: ksbszabo@wateng.UUCP (Kevin Szabo) Organization: VLSI Group, U of Waterloo Lines: 24 Summary: In article <33@daisy.UUCP> pkl@daisy.UUCP (Peter K. Lee) writes: > # define macro(args)\ > if (1) {\ > /* macro body */\ > }\ > else I am also not going to use Peter's suggestion because it too can cause un-obvious behavior, but this time if the user makes a small syntax error. Suppose I forget the semicolon when I call the macro? macro( args ) next_statment; Voila! next_statement is NEVER called because it is gobbled up in the `else' clause of the expanded macro. Yuck...that would take hours to find. I also find the macro definition hard to read...whenever I see an `else' I expect it to be controlling something. Very confusing. Kevin -- Kevin Szabo watmath!wateng!ksbszabo (U of Waterloo VLSI Group, Waterloo Ont.)