Re: K&R2 variable definition
- From: Richard Heathfield <invalid@xxxxxxxxxxxxxxx>
- Date: Thu, 26 Oct 2006 16:15:55 +0000
Clausfor said:
Hello everybody,
I cannot find where in the K&R2 it is stated that variables must be
defined at the beginning
of a block and not within other lines.
You're looking for an explicit prohibition, but you won't find one. What you
have instead is absence of permission. See page 236, grammar for
compound-statement, which shows that declarations *may* occur at the
beginning of a compound statement. Now look for other places in the grammar
where declarations *may* occur, and look at... well, at what isn't there.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.
- References:
- K&R2 variable definition
- From: Clausfor
- K&R2 variable definition
- Prev by Date: Re: New to Programming
- Next by Date: Re: va_arg()
- Previous by thread: Re: K&R2 variable definition
- Next by thread: define a struct that has its own type as a field somehow?
- Index(es):
Relevant Pages
|