At 13:41 on 8 March, Alistair Mills wrote:
> Hello Anthony and others
>
> I think that the reason why it croaks on DVF is because loc should be
> dimensioned from 0, not from 1. If you change line 9 of input.f90, then it
> works fine with both DVF and Intel Fortran. The vector loc is indexed by
> item, and item has legitimate values >=0. The alternative is to add code to
> report to deal with the case that nitems and item are zero.
>
> INTEGER, SAVE :: item=0, nitems=0, loc(0:80)=0, end(80)=0, &
Yes, I think that's right. I have made this change in the packaged
version, and also added a file containing the test output.
> IMHO, it is a good idea to avoid the use of names which are generally
> associated with standard functions (eg char) or near standard function (eg
> loc).
True, though they are private to the module and shouldn't cause conflicts.
> Having said all that, I think that Anthony has done a good job here and this
> is a good example of both doing character handling in Fortran 90/95, and
> packaging functionality into a module, so that it is easy to use.
Thank you. I hope people find it useful.
--
Anthony Stone http://www-stone.ch.cam.ac.uk/
University Chemical Laboratory, Email: [log in to unmask]
Lensfield Road, Phone: +44 1223 336375
Cambridge CB2 1EW Fax: +44 1223 336362
|