- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings:
Before I get started let me say this is not my choice of how to do things, but we all understand legacys code.
What I have is of the form :
MODULE MY_MODULE
CONTAINS
REAL (KIND=8) FUNCTION FRED(A,B,C)
IMPLICIT NONE
REAL (KIND=8) A, B, C
........................
ENTRY SHORT_CUT(B,C)
FRED=1.0D00
RETURN
END FUNCTION FRED
END MODULE MY_MODULE
The compiler complains thusly:
Intel Fortran Compiler for Intel EM64T-based applications, Version 9.1
Build 20060925
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
my_func.f90(11) : Error: This name does not have a type, and must have an explic
it type. [SHORT_CUT]
ENTRY SHORT_CUT(B,C)
------------^
my_func.f90(11) : Error: The function and entry names do not have consistent dat
a types. They do not have to be the same data type, but they must be in the sam
e data type group. [SHORT_CUT]
ENTRY SHORT_CUT(B,C)
------------^
compilation aborted for my_func.f90 (code 1)
So how do I assign a type for the entry "SHORT_CUT"
Regards
Carl
Before I get started let me say this is not my choice of how to do things, but we all understand legacys code.
What I have is of the form :
MODULE MY_MODULE
CONTAINS
REAL (KIND=8) FUNCTION FRED(A,B,C)
IMPLICIT NONE
REAL (KIND=8) A, B, C
........................
ENTRY SHORT_CUT(B,C)
FRED=1.0D00
RETURN
END FUNCTION FRED
END MODULE MY_MODULE
The compiler complains thusly:
Intel Fortran Compiler for Intel EM64T-based applications, Version 9.1
Build 20060925
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
my_func.f90(11) : Error: This name does not have a type, and must have an explic
it type. [SHORT_CUT]
ENTRY SHORT_CUT(B,C)
------------^
my_func.f90(11) : Error: The function and entry names do not have consistent dat
a types. They do not have to be the same data type, but they must be in the sam
e data type group. [SHORT_CUT]
ENTRY SHORT_CUT(B,C)
------------^
compilation aborted for my_func.f90 (code 1)
So how do I assign a type for the entry "SHORT_CUT"
Regards
Carl
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[plain] MODULE MY_MODULE
CONTAINS
REAL (KIND=8) FUNCTION FRED(A,B,C)
IMPLICIT NONE
REAL (KIND=8) A, B, C
REAL SHORT_CUT ! <----
........................
ENTRY SHORT_CUT(B,C)
FRED=1.0D00
RETURN
END FUNCTION FRED
END MODULE MY_MODULE [/plain]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
[plain] MODULE MY_MODULE
CONTAINS
REAL (KIND=8) FUNCTION FRED(A,B,C)
IMPLICIT NONE
REAL (KIND=8) A, B, C
REAL SHORT_CUT ! <----
........................
ENTRY SHORT_CUT(B,C)
FRED=1.0D00
RETURN
END FUNCTION FRED
END MODULE MY_MODULE [/plain]
Except for REAL (KIND=8) SHORT_CUT you got it .... thanks
By the way, only posted the minor correction to help with cut and pasters like me.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page