K&R App A, par. 8 & 8.2, on Declarat - (nf)

jab at uokvax.UUCP jab at uokvax.UUCP
Sun Jul 1 01:30:00 AEST 1984


#R:log-hb:-18000:uokvax:3000030:000:1343
uokvax!jab    Jun 30 10:30:00 1984

/***** uokvax:net.lang.c / log-hb!hans /  6:49 pm  Jun 27, 1984 */
[]
In K&R App A, para 8, it is stated
declaration:
	decl-specifiers declarator-list(optional);
and
decl-specifiers:
	type-specifier decl-specifiers(optional);
	sc-specifiers decl-specifiers(optional);

In para 8.2 it is stated: If the type-specifier is missing from a
declaration, it is taken to be int.

(The author then goes on to ask about assumed types.)
/* ---------- */

In the movie "Private Benjamin," a recruiter promises JAP Judy Benjamin a
three year vacation in the army. "Every soldier gets his/her own condo"

After so long, it becomes apparent that he wasn't giving her the full story.
When Judy later says something to the effect of "but my recruiter said..."
she is told "do you still believe your recruiter?"

There's an analogy here. The K&R book is fine as a tutorial, but the Reference
Manual in the back is not rigorous enough for questions such as the above. The
language specifications don't really exist: I pity anyone trying to write a C
compiler that isn't based on PCC, where your obvious out is "but that's the way
it was done in the version of the compiler I started with."

And to think, there was one class I saw where a professor asked the students for
a YACC specification of C, starting from the C Reference Manual.

	Jeff Bowles
	Lisle, IL



More information about the Comp.lang.c mailing list