FORTRAN 90: Functions, Modules, and Subroutines (pdf format)
FORTRAN 90: Functions, Modules, and Subroutines (pdf format)
FORTRAN 90: Functions, Modules, and Subroutines (pdf format)
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
INTENT(IN)<br />
• When a function is referenced, the values of the actual arguments are<br />
passed to the function<br />
– Values are used in the calculation, but should not change during execution of the<br />
function.<br />
• INTENT(IN) protects the corresponding actual argument by ensuring that<br />
the value of the formal argument cannot be changed during function<br />
execution.<br />
• If not used, the value of the formal argument may be changed in the<br />
function <strong>and</strong> the value of the corresponding actual argument will also<br />
change.<br />
• Number <strong>and</strong> type of actual arguments must agree with the number <strong>and</strong> type<br />
of formal arguments.<br />
• NOTE: Local identifiers can be defined within the function, just as in the<br />
main program.