(j3.2006) (SC22WG5.4129) Interoperability of dummy arrays

Reinhold Bader Reinhold.Bader
Thu Nov 26 17:26:35 EST 2009


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
>




More information about the J3 mailing list