home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Newsgroups: comp.lang.c
- Subject: Re: What is meant by: double A[n,m]?
- Message-ID: <1992Nov20.102416.21231@thunder.mcrcim.mcgill.edu>
- Date: 20 Nov 92 10:24:16 GMT
- References: <TORSTEIN.92Nov18125146@itekiris.kjemi.unit.no> <1992Nov18.223900.8941@kpc.com>
- Organization: McGill Research Centre for Intelligent Machines
- Lines: 24
-
- In article <1992Nov18.223900.8941@kpc.com>, hollasch@kpc.com (Steve Hollasch) writes:
- > torstein@itekiris.kjemi.unit.no (torstein hansen) writes:
- >> double A[n,m];
- > jlothian@castle.ed.ac.uk (J Lothian) writes:
- >> I suspect that's exactly what's happening. The comma operator
- >> [...]. Presumably your C compiler is quite happy to do this
- >> evaluation at compile-time, [...].
- > Not true. First of all, the expression "A[index]" is not evaluated
- > at compile time,
-
- In the original posting, it wasn't an expression, and the stuff in the
- [] was necessarily evaluated at compile-time because it was an array
- size in a declaration.
-
- As for meaningless, it's not meaningless, no. But the comma operator
- is not one of the operators allowed in compile-time constant
- expressions such as must be used to specify array sizes, so it's not
- really a legal declaration, though apparently at least one compiler
- accepts it anyway.
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-