Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-lcc!ames!pacbell!att!oucsace!pmech From: pmech@oucsace.cs.OHIOU.EDU (Paul J. Mech) Newsgroups: comp.lang.c Subject: Re: Calling multiple functions in a macro. Message-ID: <338@oucsace.cs.OHIOU.EDU> Date: 1 Nov 88 22:18:44 GMT References: <353@marob.MASA.COM> Organization: Ohio University CS Dept., Athens Lines: 13 In article <353@marob.MASA.COM>, daveh@marob.MASA.COM (Dave Hammond) writes: + In attempting to construct a macro which calls several functions, + but can be used as a single statement (i.e. without braces in an if/else + construct), I can see 2 possible alternatives: + + 1. + #define FOO() do { foo1(); foo2(); foo3() foo4(); } while(0) + + 2. + #define FOO() foo1(), foo2(), foo3(), foo4() + how about #define FOO() { foo1(); foo2(); foo3(); foo4(); }