On Fri, 7 Jan 2000 16:00:32 -0800 (PST) Richard Maine
<[log in to unmask]> wrote:
> robin writes:
> > > Richard Maine wrote:
> > >
> > > The reason F90 acts this way (I guess) is that when you pass a section of an
> > > array into a
> > > routine, you don't want to be hobbled by the fact that the section was
> > > (12:43,22:23).
This stems from a desire by the F8x committee to have an array characterised
by a simple shape vector (the sizes along each dimension) sections were
therefore defined to have lower bounds of 1, LBOUND(A(12:43)) should return 1.
If the bounds in sections were to be significant what would be the case for
non-unit stride sections, A(12:43:3)?
In most circumstances this was probably a sensible choice but the system is
incomplete. There are many cases where the bounds are not arbitrary indexes
but rather significant problem parameters that carry information. A chunk of
elements might be drawn from a model set that is potentially from
A(-HUGE:+HUGE) and A(5:10) would mean something quite different from
A(15:20). As it is we have no way of reliably programming this without
carrying an extra parameter which is essentially the lower bound. We need
someway of specifying a lowerbound for a section other than the default 1 and
we should be able to pass this lower bound through procedure calls.
Jeanne Martin proposed some syntax for dealing with some of this several
years ago. What happenned to this?
--
Lawrie Schonfelder
Director, Computing Services Dept.
The University of Liverpool, UK, L69 7ZF
Phone: 44(151)794 3716, Fax: 44(151)794 3759
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|