[comp.lang.c] Re^2: declaring variable

rblieva@cs.vu.nl (Roemer Lievaart) (04/08/89)

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