Numerical Modelling in Fortran: day 2
Numerical Modelling in Fortran: day 2
Numerical Modelling in Fortran: day 2
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
functions and subrout<strong>in</strong>es<br />
• Useful for perform<strong>in</strong>g tasks that are<br />
performed more than once <strong>in</strong> a program<br />
and/or<br />
• Modularis<strong>in</strong>g (splitt<strong>in</strong>g up <strong>in</strong>to logical<br />
chunks) the code to make it more<br />
understandable<br />
• A function returns a value, a subrout<strong>in</strong>e<br />
doesn’t (except through chang<strong>in</strong>g its<br />
arguments)