Dynamic multidimensional arrays

J. Eaton chpf127 at ut-emx.UUCP
Wed Jun 15 18:59:05 AEST 1988


In article <4556 at haddock.ISC.COM> (Karl Heuer) writes:
> In article <59 at cubsun.BIO.COLUMBIA.EDU> (Peter Shenkin) writes:
> >[What about]
> >	float **matrix( int nrl, int nrh, int ncl, int nch )
> >[and its N-dimensional generalization?]
> >	float **array( int Ndim, 
> >	  int n1l, int n1h, int n2l, int n2h, ..., int nNl, int nNh )
> 
> Since normal arrays in C are zero-based, I don't see any reason to
> specify the lower bounds.

   What if I decide I would like to have negative as well as positive
   (or zero) indices for arrays?

   Standard Fortran allows this.  Doesn't C?

> Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint


   J. Eaton
   UT Dept of Chemical Engineering

   Walking Fortran 77 Lint (well, as close as there is around here anyway :-).



More information about the Comp.lang.c mailing list