From owner-sc22wg5@open-std.org Thu Nov 26 23:41:55 2009 Return-Path: X-Original-To: sc22wg5-dom8 Delivered-To: sc22wg5-dom8@www2.open-std.org Received: by www2.open-std.org (Postfix, from userid 521) id CE4B4C76BDA; Thu, 26 Nov 2009 23:41:55 +0100 (CET) X-Original-To: sc22wg5@open-std.org Delivered-To: sc22wg5@open-std.org X-Greylist: delayed 903 seconds by postgrey-1.18 at www2.open-std.org; Thu, 26 Nov 2009 23:41:53 CET Received: from mailrelay1.lrz-muenchen.de (mailrelay1.lrz-muenchen.de [129.187.254.106]) by www2.open-std.org (Postfix) with ESMTP id 46B2BC76BCD for ; Thu, 26 Nov 2009 23:41:53 +0100 (CET) Received: from [129.187.48.195] ([129.187.48.195] [129.187.48.195]) by mailout.lrz-muenchen.de with ESMTP; Thu, 26 Nov 2009 23:26:24 +0100 Message-Id: <4B0F009B.4080408@lrz.de> Date: Thu, 26 Nov 2009 23:26:35 +0100 From: Reinhold Bader User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: fortran standards email list for J3 , WG5 Subject: Re: (j3.2006) Interoperability of dummy arrays References: <4B0ECF95.1040209@lbl.gov> In-Reply-To: <4B0ECF95.1040209@lbl.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-sc22wg5@open-std.org Precedence: bulk Hello Aleks, my impression is that the intent of 15.3.6 is to inductively flatten this into a one-dimensional structure, so void test(n[3], x[NPROD], y[]); where NPROD must have the value n(1)*n(2)*n(3) (and you strictly speaking need to specify BIND(C) on the subroutine statement). Whether this intent was really achieved I'm not sure ... Regards Reinhold Aleksandar Donev schrieb: > Hello, > > Ok, this is embarrassing, but...I was reading 15.3.6 again and > realized I cannot quite figure this out. What is the C prototype for > this interoperable routine? > > subroutine test(n,x,y) > use iso_c_binding > integer(c_int), dimension(3), intent(in) :: n > real(c_double), dimension(n(1),n(2),n(3)) :: x > real(c_double), dimension(n(1),n(2),n(3),*) :: y > end subroutine > > Happy Thanksgiving, > Aleks >