[comp.lang.c] How constant is "const"?

mcdaniel@uicsrd.csrd.uiuc.edu (05/05/88)

In draft ANSI C, are the following legal?

	const int i = 10;
	const int j = i;
	int a[i];

If they are not legal, why not?  If they are, why do K&R use
"#define"s for these kinds of applications?

The new K&R doesn't say whether a "const" identifier can appear in a
constant-expression.

-- 
Tim, the Bizarre and Oddly-Dressed Enchanter
Center for Supercomputing Research and Development
at the University of Illinois at Urbana-Champaign

Internet, BITNET:  mcdaniel@uicsrd.csrd.uiuc.edu
UUCP:    {ihnp4,uunet,convex}!uiucuxc!uicsrd!mcdaniel
ARPANET: mcdaniel%uicsrd@uxc.cso.uiuc.edu
CSNET:   mcdaniel%uicsrd@uiuc.csnet