- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I'm trying to compile the following module:
module
ReadWriteMonitor! Interfaces
interface
GetValuelogical function GetInteger(iVal)
integer, intent(inout) :: iVal
end function
logical function GetDouble(dVal)
double precision, intent(inout) :: dVal
end function
end interface
private :: GetInteger
private
:: GetDoublecontains
logical
function GetInteger(iVal), intent(inout) :: iValinteger
.....
GetInteger = .true.
return
end function
logical
function GetDouble(dVal), intent(inout) :: dValdouble precision
.........
GetDouble = .true.
return
end function
end module
I get the following error msgs:
Error: The name of the module procedure conflicts with a name in the encompassing scoping unit. [GETINTEGER]
Error: The name of the module procedure conflicts with a name in the encompassing scoping unit. [GETDOUBLE]
It looks like the compiler (IVF9.0 - I know it's old, but I need to stick to it for the time being...) doesn't like that the low-level functions GetInteger and GetDouble are defined in the same module. Indeed, when I take them out and remove the lines
private :: GetInteger
private
:: GetDoubleeverything's fine. However, I want to hide the low-level functions and to expose only GetValue as public.
Any idea how I can do it?
Thanks,
Alexander
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
interface GetValue
module procedure GetInteger
module procedure GetDouble
end interface GetValue
The error is in redefining the interface to those module procedures.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great, it works!
Thanks a lot,
Alexander

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