Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!ctnews!pyramid!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: COMMA separated expresses Message-ID: <22059@sun.uucp> Date: Thu, 25-Jun-87 04:58:10 EDT Article-I.D.: sun.22059 Posted: Thu Jun 25 04:58:10 1987 Date-Received: Sat, 27-Jun-87 01:09:04 EDT References: <1601@oliveb.UUCP> Sender: news@sun.uucp Lines: 15 > Why did my C compiler(came with 4.3bsd) complaint the "syntax error" > with the following COMMA separated express statements in a function: ... > printf("A\n"), return; /* syntax error here */ > > Could someone point this out ? It seems to me that rule 7.15 Comma > operator, on page 192 of C Programming Language doesn't state much > on this. Yes, it does. It states that a "comma-expression" is an "expression", a comma, and another "expression". "return", however, is NOT an "expression", it's a "statement". See p. 203. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com