Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compiler error - why?

Adrian_F_1
Beginner
470 Views

aupper.for(12): error #8000:  There is a conflict between local interface block and external interface block.   [FYUPPR]

Code:

      program aupper
      IMPLICIT NONE
      INTERFACE
        FUNCTION FYUPPR(STRING) RESULT(FYUPPR_0)
          CHARACTER(*) :: STRING
          CHARACTER(LEN=LEN(STRING)) :: FYUPPR_0
        END FUNCTION FYUPPR
      END INTERFACE
      CHARACTER(256) :: carg

      call getarg(1,carg)
      carg = fyuppr(carg)
      END program aupper

      FUNCTION FYuppr (STRING)
      IMPLICIT NONE
      CHARACTER(LEN=*) STRING
      CHARACTER(LEN=LEN(STRING)) FYuppr
      FYuppr = STRING
      RETURN
      END FUNCTION FYuppr

0 Kudos
2 Replies
IanH
Honored Contributor III
470 Views
Which compiler version? Works for me with 13.0.1. If building from within Visual Studio, do a Clean first (or a Rebuild), just in case left over interface checking modules are confusing things. If building from the command line delete any __genmod.mod files that might be hanging around. Then go and do twenty push ups for not putting the function in a module.
0 Kudos
Adrian_F_1
Beginner
470 Views
We're still on 11.1... I did a clean, but still the same problem. Yes I know modules need to be weened into our old code...
0 Kudos
Reply