Path: utzoo!attcan!uunet!decwrl!mcnc!gatech!bloom-beacon!eru!hagbard!sunic!news.funet.fi!tut!aps From: aps@tut.fi (Suntioinen Ari) Newsgroups: comp.lang.c Subject: Declaring array. Is this ok ? Message-ID: Date: 12 Nov 90 06:45:27 GMT Sender: news@funet.fi (#News ) Distribution: comp Organization: Tampere University of Technology, Finland. Lines: 33 I was wondering if following is legal in (ANSI) C: int somefunc(int i) { int array[i]; /* Can I use i here ? */ ... } or int i; int somefunc(void) { int array[i]; /* How about here ? */ ... } I tried to figure it out from K&R. It went clearly over my understanding. Gcc seems to accept both. Thanks for advance, -- +------------------------------+--------------------------------------------+ ! Ari Suntioinen -- aps@tut.fi ! There is no dark side in the Force really. ! ! ! As a matter of fact it's all dark. ! +------------------------------+--------------------------------------------+