From: Andrew Ross <andrewross@us...>  20111019 17:52:39

On Wed, Oct 19, 2011 at 10:39:28AM 0700, Alan Irwin wrote: > Hi Arjen: > > Now that you have put in a notice in README.release about the future > deprecation of our f77 bindings and examples, and Andrew has done such > great work making our f95 bindings and examples much more compliant > with the Fortran 95 standard, I think our next obvious Fortran step is > to follow up by using more of the power of Fortran 95 in our f95 > examples. > > For example, I understand that intrinsic functions like sin, cos, > etc., can take array arguments and return the corresponding array > results (just like the corresponding numpy Python capability that is > used in examples/python/xw??.py) so using this Fortran 95 capability > should eliminate many of the do loops in our examples. > > That is just one Fortran 95 capability we are currently not using in > our f95 examples, but I am sure you can find some more since most of > our f95 examples started life as a copy of our f77 examples. So could > you please review some of our f95 examples and list how they could be > simplified/modernized by using the full powers of Fortran 95? > > I would be very happy to learn more about Fortran 95 capability so > once you have put together such a list and demonstrated what needs to > be done for one our more complicated examples (say, example 16), I > would be willing to help with some of the editing work required to > propagate such simplification/modernization changes to all our f95 > examples. I have changed a few things which were not wrong, but were not the f95 way of doing it, e.g. variable definitions. There is a lot more that could be done. One thing I didn't add  if you want to compile the f95 bindings with std=f95 at the moment, you also need to add fallintrinsics to work around the nonf95 intrinsics we currently use. This is a bit of a sledge hammer approach, but is useful to know for now while we consider which standard we want to follow. Andrew 