I have a question about FORTRAN

  • Fortran
  • Thread starter FuriousJ
  • Start date
  • Tags
    Fortran
In summary, you need to include a USE statement for the global.f95 module in each subroutine or function that requires it, in order to call the module from other .f95 files. This may seem simple but can be difficult to implement at first.
  • #1
FuriousJ
5
0
So I'm starting to learn FORTRAN, and I'm starting to do makefile's and modules.

Now the book I have that I've been learning from tells me all about Modules that I can put at the beginning of a file for use throughout the rest of that file, but seems to be glazing over how I can have a global.f95 module that I can call from other .f95 files. I assume this is more simple to do than the amount of time I've been trying to get it to work would indicate, is this a correct assumption? Or is it a difficult process?
 
Technology news on Phys.org
  • #2
FuriousJ said:
So I'm starting to learn FORTRAN, and I'm starting to do makefile's and modules.

Now the book I have that I've been learning from tells me all about Modules that I can put at the beginning of a file for use throughout the rest of that file, but seems to be glazing over how I can have a global.f95 module that I can call from other .f95 files. I assume this is more simple to do than the amount of time I've been trying to get it to work would indicate, is this a correct assumption? Or is it a difficult process?

You must include a USE statement for the module
in each subroutine or function that requires use of the module.
 

Related to I have a question about FORTRAN

What is FORTRAN?

FORTRAN (short for FORmula TRANslation) is a high-level programming language used primarily for scientific and engineering applications. It was developed in the 1950s and is known for its ability to handle complex mathematical calculations and numerical analysis.

Why was FORTRAN created?

FORTRAN was created to simplify the process of programming complex mathematical and scientific calculations. Before its development, programming was done using machine code, which was a time-consuming and error-prone process. FORTRAN allowed scientists and engineers to focus on the problem at hand rather than worrying about the intricacies of programming.

Is FORTRAN still used today?

Yes, FORTRAN is still widely used today, particularly in scientific and engineering fields. It has evolved over the years and newer versions, such as FORTRAN 90 and FORTRAN 95, have been released to keep up with modern programming languages. Many legacy codes and programs are still written in FORTRAN, making it a valuable language to know for those working in these fields.

What are the advantages of using FORTRAN?

FORTRAN is known for its efficiency and speed in performing complex mathematical calculations. It also has a simple syntax and is easy to learn, making it a popular choice for scientists and engineers. It also has a large library of built-in functions and subroutines specifically designed for scientific applications.

Are there any disadvantages to using FORTRAN?

One potential disadvantage of using FORTRAN is that it is not as versatile and flexible as other modern programming languages. It is primarily used for scientific and engineering applications and may not be suitable for other types of programming tasks. Additionally, as it is an older language, it may not have all the features and capabilities of newer languages.

Similar threads

  • Programming and Computer Science
Replies
8
Views
2K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
12
Views
1K
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
5
Views
756
  • Programming and Computer Science
Replies
8
Views
990
  • Programming and Computer Science
Replies
8
Views
3K
  • Programming and Computer Science
Replies
17
Views
5K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
Replies
16
Views
2K
Back
Top