Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!rblieva From: rblieva@cs.vu.nl (Roemer Lievaart) Newsgroups: comp.lang.c Subject: Re^2: declaring variable Message-ID: <2265@solo4.cs.vu.nl> Date: 7 Apr 89 21:08:40 GMT References: <26707@tiger.oxy.edu> <961@atanasoff.cs.iastate.edu> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 51 hascall@atanasoff.cs.iastate.edu (John Hascall) writes: >In article <26707@tiger.oxy.edu> bagpiper@oxy.edu (Michael Paul Hunter) writes: >>Within this program was a declaration that was similar to: >>double A, >> B, >> fooY, >> fooX, >> whelp; /* <--- note this */ >> WhatAmI, >> AndMoreVariables; > It looks like what we have here is: > double A....whelp; > WhatAmI, AndMoreVariables; > ^ ^ ^ > expr comma expression > operator > Which appears to be a valid (although non-useful) statement. *Very* unlikely, since this can only be if a) the declaration is within a function b) the variables WhatAmI and AndMoreVariables already exist >Any other guesses? If the declaration is a global declaration, the compiler probably just sees the variables WhatAmI and AndMoreVariables as int's. I've only met one compiler (in UNIX, on a PDP11), who has trouble with leaving the word 'int' away if there isn't anything else like 'short', 'unsigned', 'extern', etc. It's just like you can write nothing(a) { return a; } instead of int nothing(a) { return a; } >John Hascall ____________________________________________________________________________ Roemer B. Lievaart | "But make sure you do it right the first time, Amsterdam, Holland | 'cause nothing's worse than a suicide chump" rblieva@cs.vu.nl | -- Frank Zappa