Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!uflorida!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uicsrd.csrd.uiuc.edu!mcdaniel From: mcdaniel@uicsrd.csrd.uiuc.edu Newsgroups: comp.lang.c Subject: How constant is "const"? Message-ID: <44200010@uicsrd.csrd.uiuc.edu> Date: 4 May 88 21:39:00 GMT Lines: 22 Nf-ID: #N:uicsrd.csrd.uiuc.edu:44200010:000:621 Nf-From: uicsrd.csrd.uiuc.edu!mcdaniel May 4 16:39:00 1988 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