Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!rutgers!clyde!cuae2!gatech!gitpyr!thomps From: thomps@gitpyr.gatech.EDU (Ken Thompson) Newsgroups: comp.lang.c Subject: Re: "exit 0;" - or - "exit (0);" ? Message-ID: <2661@gitpyr.gatech.EDU> Date: Tue, 18-Nov-86 09:52:32 EST Article-I.D.: gitpyr.2661 Posted: Tue Nov 18 09:52:32 1986 Date-Received: Wed, 19-Nov-86 02:47:54 EST References: <1512@batcomputer.tn.cornell.edu> Distribution: net Organization: Georgia Institute of Technology Lines: 17 Summary: Ok for Bourne shell In article <1512@batcomputer.tn.cornell.edu>, braner@batcomputer.tn.cornell.edu (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? exit must be a function in C. However, exit 0; is legitimate Bourne shell syntax. Is it possible that you have seen this in a shell script not a C program ? -- Ken Thompson Phone : (404) 894-7089 Georgia Tech Research Institute Georgia Insitute of Technology, Atlanta Georgia, 30332 ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!thomps