Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > User types + in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 8389 of 8908
Post > Topic >>

User types + interface in the same module

by Dennis Wassel <dennis.wassel@[EMAIL PROTECTED] > Jun 17, 2008 at 07:36 AM

Hi!

Following your comments on the "allocatable components and mixed-
language" thread, I have come across another problem, though this one
surely is easier to tackle:

I define something like

MODULE MyMod
TYPE :: MyType
  ! stuff
END TYPE MyType

INTERFACE
  SUBROUTINE Foobar(mt)
    TYPE(MyType) :: mt
  END SUBROUTINE Foobar
END INTERFACE

END MODULE MyMod

i.e. a user type and some functions* that work on it. Both the GNU and
Intel compilers complain they don't know about MyType, which I could
mend with USE MyMod, if only this wouldn't be recursive...

Do I really need to define my interfaces in a separate module so I can
USE MyMod?

*Foobar is written in C, that's why I define this explicit interface
together with BIND(C) and friends.

Thanks!
Dennis
 




 7 Posts in Topic:
User types + interface in the same module
Dennis Wassel <dennis.  2008-06-17 07:36:06 
Re: User types + interface in the same module
Steve Lionel <Steve.Li  2008-06-17 10:59:52 
Re: User types + interface in the same module
Tobias Burnus <burnus@  2008-06-17 08:04:41 
Re: User types + interface in the same module
"James Van Buskirk&q  2008-06-17 11:42:50 
Re: User types + interface in the same module
Dennis Wassel <dennis.  2008-06-17 08:16:55 
Re: User types + interface in the same module
Arno <arnoinperu@[EMAI  2008-06-23 05:32:40 
Re: User types + interface in the same module
Steve Lionel <Steve.Li  2008-06-23 09:51:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Nov 19 7:36:27 CST 2008.