Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Is this possible?

Author: Gareth McCaughan

Date: 07:41:17 09/29/02

Go up one level in this thread


On September 27, 2002 at 21:44:57, Dann Corbit wrote:

> On September 27, 2002 at 21:07:48, Gareth McCaughan wrote:
>
>> On September 27, 2002 at 16:07:33, Vincent Diepeveen wrote:
>>> You really want there:
>>>      4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
>>
>> Why? Nothing wrong with having a trailing comma, last time
>> I looked. (In particular, it doesn't make an extra entry
>> in the array or anything like that.)
>
> Vincent is right.  It is a violation of the ANSI/ISO C standard.  It relies on a
> compiler extension that may or may not be available.

It's permitted in C9x (section 6.5.8, third production for "initializer")
and, for what it's worth, by the 1996 draft of the C++ standard
(section 8.5, second production for "initializer-clause").

I don't have either the C89 standard or the proper C++ standard
handy, so I can't check those.

--
g



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.