- #1
Yascho Bob
- 1
- 0
Hi,
I need to write a subroutine that accepts as an argument an array of any number of dimensions, where each dimensions has any size. The array is contiguously allocated.
In C, I can do this pretty cleanly.
void array_func(int ndims, int *dims, int *array)
{
// do stuff with the array
// in C, using *array is okay so long as the array was allocated contiguously.
}
Any advice on how to do this with fortran? I'm a total newb at Fortran.
I need to write a subroutine that accepts as an argument an array of any number of dimensions, where each dimensions has any size. The array is contiguously allocated.
In C, I can do this pretty cleanly.
void array_func(int ndims, int *dims, int *array)
{
// do stuff with the array
// in C, using *array is okay so long as the array was allocated contiguously.
}
Any advice on how to do this with fortran? I'm a total newb at Fortran.