From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2000-12-07 15:10:24
Those in purgatory (what sin did I commit?),
translating algorithms from FORTRAN find it much easier to
have 1-based arrays.
(There is STILL a bottomless pit of working subroutines...!)
Translators produce dreadful code, but at least work correctly.
Hand conversion produces decent C++ code, but the base change
means that the process is very error-prone and I have finally
gone back to using the original algorithms and writing from scratch,
but checking output from test data against the original FORTRAN output.
This is a serious pain.
Neither zero or 1 based offset is sigificantly better,
but having two bases in use is very bad indeed.
Paul A. Bristow
Prizet Farmhouse, Kendal, Cumbria LA8 8AB UK
Phone, FAX & Voicemail +44 1539 561830
> -----Original Message-----
> From: gbavestrelli_at_[hidden] [mailto:gbavestrelli_at_[hidden]]
> Sent: Wednesday, December 06, 2000 10:29 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: A class template for an N-dimensional generic
> resizable array
> --- In boost_at_[hidden], Kevlin Henney <kevlin_at_c...> wrote:
> > In message <003901c05fa0$23f097b0$460a10ac_at_r...>, Kris Thielemans
> > <kris.thielemans_at_i...> writes
> > >> >> >- I allow indices with non-zero offset
> > >>
> > >> For any particular reason?
> > >
> > >just to have more natural index values in our application.
> This is very easy to add to the array, and does not complicate the
> interface much. But I preferred to leave it out, in line with
> standard C arrays and STL vectors. How do others feel about this?
> Giovanni Bavestrelli
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk