From owner-sc22wg5@open-std.org  Thu Dec 11 12:20:28 2008
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom7
Delivered-To: sc22wg5-dom7@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id A5016CA3439; Thu, 11 Dec 2008 12:20:28 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from sca-es-mail-2.sun.com (sca-es-mail-2.Sun.COM [192.18.43.133])
	by www2.open-std.org (Postfix) with ESMTP id 4A8F1C178E6
	for <sc22wg5@open-std.org>; Thu, 11 Dec 2008 12:20:22 +0100 (CET)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id mBBBKADN017234
	for <sc22wg5@open-std.org>; Thu, 11 Dec 2008 03:20:21 -0800 (PST)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0KBP00801M0SN100@fe-sfbay-09.sun.com>
 (original mail from Robert.Corbett@Sun.COM) for sc22wg5@open-std.org; Thu,
 11 Dec 2008 03:20:10 -0800 (PST)
Received: from [129.146.84.104] by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <0KBP0051PM5E1UB0@fe-sfbay-09.sun.com>; Thu,
 11 Dec 2008 03:20:02 -0800 (PST)
Date: Thu, 11 Dec 2008 03:20:02 -0800
From: Robert Corbett <Robert.Corbett@Sun.COM>
Subject: Re: (j3.2006) (SC22WG5.3792)  Response on the TR29113 draft N1761
In-reply-to: <20081209174400.D37EDC178D6@www2.open-std.org>
To: fortran standards email list for J3 <j3@j3-fortran.org>
Cc: WG5 <sc22wg5@open-std.org>
Reply-To: Robert.Corbett@Sun.COM
Message-id: <4940F762.3070701@sun.com>
Organization: Sun Microsystems, Inc.
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
References: <493E10FF.6010504@llnl.gov>
 <20081209174400.D37EDC178D6@www2.open-std.org>
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.13) Gecko/20060509
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Aleksandar Donev wrote:
> Hi,
> 
> Thanks to train travel downtime, I was able to go through Reinhold's 
> missive. Some comments below.
> 
> Reinhold Bader wrote:
> 
>>Issue 5 - RANK intrinsic:
>>~~~~~~~~~~~~~~~~~~~~~~~~~~
>>Is this really needed considering we already have SIZE(SHAPE(X))?
> 
> Is AINT really necessary since you can write it so easily? I see no 
> reason not to add RANK just because it can be awkwardly handled already.

The intrinsic function AINT is not easy to implement, especially
if it is to be implemented in Fortran.  It is easy to write a
version that works for floating-point values that fit in an integer,
but for values between the largest integer and the largest
floating-point value that is not a pure integer, it is tricky.

I agree that adding a function RANK makes sense, even if it can
be implemented another way.  Most people would not immediately
recognized what SIZE(SHAPE(X)) does.  Most compilers would if it
became a common idiom, but Fortran code should be understandable
by humans as well as machines.

Bob Corbett
