On Friday 29 June 2007 03:43, Colin Millar wrote:
> My issue is with the dimension attribute - ideally I would like to do
> something like
> dimension(shape(M)) :: p_at_M
> Or
> dimension(repeat(3,4)) :: p_at_M
This has been proposed for the new revisions of Fortran (2003, 2008, etc.) and
has never been accepted. I know Van has proposed it several times.
In general, Fortran does not have many if any tools for "variable
dimensionality", that is, for rank-generic programming. I use macros
(external to Fortran) myself heavily to do things like this (so a macro
shape(M,rank) that will expand to a sequence of dimensions).
Aleks
|