I have a question about defining array operations for derived-type
objects.
Starting with interfaces and functions to define +-*/ for the objects,
I want
to extend them to provide array operations like A+B where A and B are
arrays
of the objects.
My question concerns how to handle the cases where A and B are
1-dimensional
arrays, 2-dimensional arrays, etc. Do I have to write separate
functions
for each case, with TYPE (X), DIMENSION(:) :: A for one case, and then
TYPE (X), DIMENSION(:,:) :: A for the next, or is there a way to
define the
array syntax in a single function that handles all the different
possible
ranks for the arrays?
David Smith
[log in to unmask]
|