Re: [AMBER-Developers] intent (in/out)

From: Scott Brozell <sbrozell.rci.rutgers.edu>
Date: Fri, 24 Sep 2010 22:36:39 -0400

Hi,

On Fri, Sep 24, 2010 at 10:42:00AM -0400, Jason Swails wrote:
> I'm in the process of looking through some subroutines (at the moment, the
> ewald force routine) to make sure that I know what it does before I try to
> use any of them. Specifically, for ewald_force, none of the passed
> arguments are given an explicit "intent" statement, making me follow all of
> the variables to see if they're changed anywhere. Is there any reason why I
> should NOT add the intent statements after I follow them to their end? (I
> will, of course, compile and test before I actually push any changes). I
> just didn't want to add those changes to the master branch if there was any
> reason they're omitted.

No, please add them. That is all pre-f90 code, where intent did not
yet exist. Also heed this advice:

http://ambermd.org/pmwiki/index.php/Main/Coding
" * Use the intent option for arguments, but use them correctly. There were a number of places in Amber 9 where intent(out) was used for variables whose intent should have been inout. "

For an explanation see
http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html#2

Scott


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Sep 24 2010 - 20:00:03 PDT
Custom Search