Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8794619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:16:35+00:00 2026-06-13T23:16:35+00:00

I stumbled with a way to run in a child module a procedure of

  • 0

I stumbled with a way to run in a child module a procedure of the father. I mean, the trick allow me to run a process in a upstream way, in relation with the dependencies tree of the modules. In concrete, here is the example:

module parent
  procedure(likefoo),pointer :: to_foo
  interface 
    subroutine likefoo
    end subroutine likefoo
  end interface
contains
  subroutine run
   call to_foo
  end subroutine
end module 

module child
  use parent
contains
  subroutine foo
      print *, 'hola'
  end subroutine foo
end module 

program main
  use parent
  use child

  to_foo => foo
  call run

end program 

This example was positive tested with ifort 13.0.0.
I wonder, This code is allowed by the standard or just it run ok because is a compiler dependence feature?.
Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:16:36+00:00Added an answer on June 13, 2026 at 11:16 pm

    The approach is fine (using F2003 features), but make the interface for likefoo abstract. The requirement for a directed graph of module dependence is an orthogonal concept to the nesting of calls to procedures in those modules.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I stumbled on a way to crash excel in Workbook_Open while making an .xla
I've recently stumbled across geb and it looks like a good way to perform
I'm working my way through some code examples and I stumbled upon this: endings
I am working my way through learning Twisted, and have stumbled across something I'm
I have recently stumbled over a seeming inconsistency in Python's way of dealing with
While searching for a way to define static constructors, I've stumbled upon the use
I've stumbled across a problem way beyond my area of expertise, and I don't
I stumbled across a simplistic, but helpful way to password protect a page here:
I run the following code and after researching the web, I stumbled upon a
It seems I've stumbled my way onto LINQ and have only just managed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.