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 8387301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:10:26+00:00 2026-06-09T18:10:26+00:00

I just read the very good question/answers here about proper ways to use modules

  • 0

I just read the very good question/answers here about proper ways to use modules in Fortran. By writing subroutines in modules, one makes them explicit, in addition to clarifying the code.

To my knowledge, a module has to be put in a single file, for instance “mod_exemple.f90”.
Programs I write are often very long, with many subroutines that indeed could be sorted by purpose and thus be put in modules. The problem: that would do very long module files, with hundreds of lines.

Can you split a module over several files? Is it advised? Why? Do you have other suggestions that splitting?

  • 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-09T18:10:27+00:00Added an answer on June 9, 2026 at 6:10 pm

    I would advoid splitting a module over mutiple files, it is not that standard a practice and I would find it more difficult to read/understand than if all related routines were in the same file. If your modules are too large then I strongly suggest rethinking the logic of the modules and seeing if you cannot factor out common code and utility routines into their own modules. Rather than having your related code spread across multiple files a well documented, well formated single file module source would be best solution, regardless of how many lines that takes.

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

Sidebar

Related Questions

I just wrote a very simple perl tk script to read a huge text
I've just learned POI and find the HSSF is very simple to read and
I just read in Code Complete that you should not use exceptions for flow
I just read this great answer from BalusC about how to upload files with
I just read about the breadth-first search algorithm in the Introduction to Algorithms book
I know this question has been asked before and I read all the answers
Apologies for the rather simple question, I just can't seem to find ANY good
I've just read the SUN java code conventions ; very nice document btw. And
I'm hoping someone can help with this very newbie question. I've just come from
This is a common question, and I have read up on the various ways

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.