Are we supposed to declare function names and type in the main program?
For example if i have a program named which has this header recursive function sum(a,b) result(result)
When i try to compile this, i get a few errors.
Error: Return type mismatch of function 'sum' at (1) (UNKNOWN/INTEGER(4))
Error: Function 'sum' at (1) has no IMPLICIT type
I managed to get rid of the errors by declaring the function in the main program for example:
integer :: sum
Why does this happen? Are we always supposed to do this?