Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site log-hb.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!decvax!mcvax!enea!log-hb!hans From: hans@log-hb.UUCP (Hans Albertsson) Newsgroups: net.lang.c Subject: Are explicit declarations necessary? Message-ID: <175@log-hb.UUCP> Date: Fri, 15-Jun-84 17:40:02 EDT Article-I.D.: log-hb.175 Posted: Fri Jun 15 17:40:02 1984 Date-Received: Tue, 19-Jun-84 04:20:47 EDT Organization: TeleLOGIC Nyn{shamn SWEDEN Lines: 28 [] Having looked through K&R carefully, and at lots of C source too boot, I'm a bit bewildered; is code like a; funcname() { a = 1; printf("%d",a); } at all permissible? Isn't it nessecary to declare a as int, even if my pcc-based compiler seems to think int is a kind of default? As an aside, one of the contributions to the obfuscated code contest did things like this. K&R seems to permit dropping int only in connection with so called "adjectives", that is: unsigned a; is ok, but only because unsigned is there. -- {decvax,philabs}!mcvax!enea!log-hb!hans Hans Albertsson, TeleLOGIC AB Box 1001, S-14901 Nynashamn, SWEDEN