Skip to main content

9.9) Important Points About Writing Functions


Here are a couple of important comments about example 16.

You must declare the function as a type (like real in the example), see:

real :: x,y,s,myfn

The function must have a line where the name of the function (myfn in the example) is set equal to the result. See:

myfn=sqrt(s)

This usually occurs just before the end of the function.