From owner-sc22wg5@open-std.org  Fri Sep 23 12:46:22 2005
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-domo2
Delivered-To: sc22wg5-domo2@open-std.org
Received: by open-std.org (Postfix, from userid 521)
	id 2430F1ECB2; Fri, 23 Sep 2005 14:46:22 +0200 (CEST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from dkuug.dk (ptah.dkuug.dk [195.215.30.66])
	by open-std.org (Postfix) with ESMTP id 40F501EBAC
	for <sc22wg5@open-std.org>; Fri, 23 Sep 2005 14:46:19 +0200 (CEST)
Received: from balin.rl.ac.uk (balin.rl.ac.uk [130.246.135.155])
	by dkuug.dk (8.12.10/8.9.2) with ESMTP id j8NCkIid014283
	for <sc22wg5@dkuug.dk>; Fri, 23 Sep 2005 14:46:26 +0200 (CEST)
	(envelope-from j.k.reid@rl.ac.uk)
X-RAL-MFrom: <j.k.reid@rl.ac.uk>
X-RAL-Connect: <jkr.cse.rl.ac.uk [130.246.9.202]>
Received: from jkr.cse.rl.ac.uk (jkr.cse.rl.ac.uk [130.246.9.202])
	by balin.rl.ac.uk (8.12.8/8.12.8) with ESMTP id j8NCPbxb007412;
	Fri, 23 Sep 2005 13:25:37 +0100
Received: from rl.ac.uk (localhost.localdomain [127.0.0.1])
	by jkr.cse.rl.ac.uk (8.12.10/8.12.8) with ESMTP id j8NCWOPu007223;
	Fri, 23 Sep 2005 13:32:24 +0100
Message-ID: <4333F5D8.4000306@rl.ac.uk>
Date: Fri, 23 Sep 2005 13:32:24 +0100
From: John Reid <j.k.reid@rl.ac.uk>
Reply-To: j.k.reid@rl.ac.uk
Organization: Rutherford Appleton Laboratory
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20041005
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: WG5 <sc22wg5@dkuug.dk>
Subject: [Fwd: Enumerations in fortran 2003]
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.39
X-Spam-Score: 0.496 () MAILTO_TO_SPAM_ADDR
Sender: owner-sc22wg5@open-std.org
Precedence: bulk



Dear Gaurav,

Because of spam, we have had to make the WG5 list closed, so I am forwarding
this to it. If you would like to join the list please ask David Muxworthy
<d.muxworthy@bcs.org.uk>

John Reid.


Date: Fri, 23 Sep 2005 16:51:41 +0530
From: Gaurav Gautam <gauravgautam123@gmail.com>
Reply-To: Gaurav Gautam <gauravgautam123@gmail.com>
To: sc22wg5@dkuug.dk
Subject: Enumerations in fortran 2003
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-Spam-Score: 0.999 () FROM_ENDS_IN_NUMS

Hi,

I am a compiler developer and I am working to implement ENUMERATORS
and ENUMERATIONS in a compiler. I have a few queries related to
interoperability of ENUMERATIONS with C.

I think this is the right place to discuss this. In case it is not,
please tell me as to where can i discuss my queries about the Fortran
standard.

The J3/03-007R2 Final Committee Draft OCT 2003  says that

"For an enumeration, the kind is selected such that an integer type
with that kind is interoperable (15.2.1) with the corresponding C
enumeration type."


I am not able to clearly understand the above description. Can anyone
please elaborate this in detail.

My doubt is that since the enumeration in fortran is a set of
enumerators. We cannot declare an object of a fortran enumeration
type, what does "kind of an enumeration means".


For example

Enum e { a, b, c }

We have an enum type "e", which can have some type.


But since we don't have any enum type in fortran, but only a list of
enumerators in fortran, what does standard wants to say in the words "
For an enumeration, the kind is selected".


Thanks
Gaurav


