I am trying to learn to work with functions. I have the following code:
program main implicit none write(*,*) test(4) end program integer function test
Just put this:
program main implicit none
integer test
write(*,*) test(4) end program ...
You need to declare the function as a variable for the compiler to know the return type of the function.