From owner-sc22wg5@open-std.org  Wed Jul 16 20:26:12 2008
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom6
Delivered-To: sc22wg5-dom6@open-std.org
Received: by open-std.org (Postfix, from userid 521)
	id B1456DA1A4; Wed, 16 Jul 2008 20:26:12 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from mail1.cray.com (mail1.cray.com [136.162.0.111])
	by open-std.org (Postfix) with ESMTP id D17CC393D9
	for <sc22wg5@open-std.org>; Wed, 16 Jul 2008 20:26:03 +0200 (CET DST)
Received: from beaver.us.cray.com (beaver.us.cray.com [172.30.74.51])
	by mail1.cray.com (8.13.6/8.13.3/gw-5323) with ESMTP id m6GIPx45006017
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 16 Jul 2008 13:25:59 -0500 (CDT)
Received: from CFEXFE01.us.cray.com (cfexfe01.us.cray.com [172.30.74.93])
	by beaver.us.cray.com (8.13.8/8.13.3/hub-5273) with ESMTP id m6GIPvXI013287;
	Wed, 16 Jul 2008 13:25:57 -0500
Received: from mh-dhcp-172-31-20-57.us.cray.com ([172.31.20.57]) by CFEXFE01.us.cray.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959);
	 Wed, 16 Jul 2008 13:25:57 -0500
Message-ID: <487E3D35.8090209@cray.com>
Date: Wed, 16 Jul 2008 13:25:57 -0500
From: Bill Long <longb@cray.com>
Reply-To: longb@cray.com
Organization: Cray Inc.
User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031)
MIME-Version: 1.0
To: Van.Snyder@jpl.nasa.gov,
        fortran standards email list for J3 <j3@j3-fortran.org>
CC: sc22wg5 <sc22wg5@open-std.org>
Subject: Re: (j3.2006) (SC22WG5.3585)  OPTIONAL arguments and C interop
References: <20080716151703.5BDC9D9F76@open-std.org> <20080716181712.65A65D9F76@open-std.org>
In-Reply-To: <20080716181712.65A65D9F76@open-std.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 16 Jul 2008 18:25:57.0488 (UTC) FILETIME=[63FC9F00:01C8E771]
X-Cray-VirusStatus: clean
Sender: owner-sc22wg5@open-std.org
Precedence: bulk



Van Snyder wrote:
> On Wed, 2008-07-16 at 09:47 -0500, Bill Long wrote:
>   
>> A side effect of this design is that OPTIONAL and VALUE cannot be both
>> specified for a particular dummy argument.
>>     

Sorry, I should have said that the above restriction would apply only 
for interfaces with BIND(C).

>
> Bill:
>
> I don't understand this problem.
>
> I would think that processors could use their Fortran conventions for
> argument forms that don't exist in C, i.e., assumed-shape arrays,
>   
The TR is adding these as interoperable.

> optional arguments, 

And these.

> and optional+value arguments. 

But not these.  For non-Bind(C) interfaces, vendors would continue with 
their current implementation for this case.

>  The TR would specify
> functions or structs to access and create such arguments.  Preferably
> functions, so that vendors can provide them according to their Fortran
> conventions, instead of changing their Fortran conventions to conform to
> structs specified by the TR for the BIND(C) case.
>   

Yes, that's the basic plan for assume-shape, allocatable, and pointer 
arguments.  At least to the extent that the vendor's current mechanisms 
supply enough information to populate the structs on the C side.

Cheers,
Bill

> Van
>
>
> _______________________________________________
> J3 mailing list
> J3@j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>   

-- 
Bill Long                                   longb@cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

            

