Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!brl-sem!ron From: ron@brl-sem.ARPA (Ron Natalie ) Newsgroups: comp.lang.c Subject: Re: "exit 0;" - or - "exit (0);" ? Message-ID: <484@brl-sem.ARPA> Date: Mon, 17-Nov-86 19:54:16 EST Article-I.D.: brl-sem.484 Posted: Mon Nov 17 19:54:16 1986 Date-Received: Mon, 17-Nov-86 23:00:37 EST References: <1512@batcomputer.tn.cornell.edu> <331@cartan.Berkeley.EDU> Distribution: net Organization: Electronic Brain Research Lab Lines: 13 In article <331@cartan.Berkeley.EDU>, ballou@brahms (Kenneth R. Ballou) writes: > In article <1512@batcomputer.tn.cornell.edu> braner@batcomputer.UUCP (braner) writes: > >While K&R explicitly say that exit() is a function, I commonly see > >the parens dropped. Is that "legal"? Does it work on existing compilers? > > Note that 'exit' is not a reserved word in (K&R) C. Therefore, the > compiler should reject the construct exit 0; on at least two grounds. Perahps this poor soul is getting exit confused with return. Return does not require parentheses. Exit in every implementation that I have seen is indeed a function and requires "()" as a minimum. -Ron