Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!unmvax!tut.cis.ohio-state.edu!ukma!husc6!bbn!oberon!oxy!bagpiper From: bagpiper@oxy.edu (Michael Paul Hunter) Newsgroups: comp.lang.c Subject: declaring variable Message-ID: <26707@tiger.oxy.edu> Date: 5 Apr 89 20:55:12 GMT Organization: Occidental College, Los Angeles, CA 90041 Lines: 27 A friend of mind had a program that wasn't working properly. (what a nice start) Within this program was a declaration that was similar to: double A, B, fooY, fooX, whelp; /* <--- note this */ WhatAmI, AndMoreVariables; He was compiling his program under TurboC 2.0. The compiler with all warning turned on was not saying anything about the semi after whelp. But It did not appear to be allocating space for the variable....at least in the debugger if there was a line of the form whelp=constant, whelp did not change value. Two questions: 1) Why isn't WhatAmI, AndMoreVariables; a syntax error? How does the grammar produce this? 2) What happens on other machines....do most compilers say something and does lint howl? Thank you, Michael Hunter bagpiper@oxy.edu