- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi to all. Is there any approach to define a derived type parameter whose components are decorated with PRIVATE attribute ? Like:
module test implicit none type :: my private integer :: a contains ...........some type-bound procedures....... end type my type(my), parameter :: const_my = my(a=100) !!! This is wrong here !!! end module test
If not, any suggestions that I could accomplish things like this, Thanks for reply.
Link Copied
- « Previous
-
- 1
- 2
- Next »
21 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:
Presumably, the compiler could (would) catch the inout applied to a parameter(ized) type.
Jim Dempsey
Yes, Jim. The compiler gives the error:
error #6638: An actual argument is an expression or constant; this is not valid since the associated dummy argument has the explicit INTENT(OUT) or INTENT(INOUT) attribute. [MAXVALUE] error #6638: An actual argument is an expression or constant; this is not valid since the associated dummy argument has the explicit INTENT(OUT) or INTENT(INOUT) attribute. [MAXVALUE]

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
- « Previous
-
- 1
- 2
- Next »