- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash]MODULE Application
PRIVATE
TYPE, PUBLIC, ABSTRACT:: t_Application
INTEGER*4:: status = 0
CONTAINS
PROCEDURE, PASS(this):: Initialize
PROCEDURE(Initialize), PASS(this), DEFERRED:: Run
PROCEDURE(Initialize), PASS(this), DEFERRED:: Finalize
END TYPE t_Application
ABSTRACT INTERFACE
FUNCTION Initialize(this)
IMPORT:: t_Application
CLASS(t_Application), INTENT(IN):: &
this
INTEGER*4:: Initialize
END FUNCTION Initialize
END INTERFACE
END MODULE Application[/bash]
If I make the Initialize procedure "DEFERRED", the compiler complains about needing an interface:
Error 1 error #8261: If DEFERRED attribute appears in the type bound procedure definition statement, an interface name must appear. [DEFERRED]
Since I have an interface name declared as an ABSTRACT INTERFACE, I don't see the problem.
If I remove the deferred for the Initialize bound procedure (as is done above), the code compiles.
Why can't I make all the bound procedures deferred?
Best,
Dick Munroe
Error 1 error #8261: If DEFERRED attribute appears in the type bound procedure definition statement, an interface name must appear. [DEFERRED]
Since I have an interface name declared as an ABSTRACT INTERFACE, I don't see the problem.
If I remove the deferred for the Initialize bound procedure (as is done above), the code compiles.
Why can't I make all the bound procedures deferred?
Best,
Dick Munroe
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never mind, I answered my own question when I dug a little further. The interface name is required in a deferred procedure. I assumed that the name that followed the PROCEDURE was a bound procedure name. When I read the specification a little more closely, I noticed that the name is an INTERFACE name.
Sorry for the waste of bandwidth.
Best,
Dick Munroe
![](/skins/images/98E68944C1FF703B8AC50091329B92AF/responsive_peak/images/icon_anonymous_message.png)
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