What are the Differences Between Fortran 77 and Fortran 90?

  • Fortran
  • Thread starter svishal03
  • Start date
  • Tags
    Fortran
In summary, the conversation discusses the differences between Fortran 77 and Fortran 90, including control structures, numeric processing, processing of arrays, and handling of data structures. Specific examples are requested for each difference, including a DO construct with a while control, declaring real variables with precision, referencing parts of an array, and input/output features in Fortran 90. The person is seeking any other useful differences between the two programming languages.
  • #1
svishal03
129
1
Hi All,

I have an interview concerning Fortran programming. Actually one section of the interview will be on Fortran programming.

First, i am trying to get differences between Fortran 77 and Fortran 90 and have the following questions. The differences are:

1) Control Structures:

Fortran 90 has a case construct additionally and the DO, IF and CASE construct can have construct names.

The DO construct can have a WHILE control.

Question: Can anyone give an example i.e. DO construct with a while control?
2) Numeric processing

Fortran 90 contains features that allow the programmer that allow the programmer to specify the precision in a more portable manner. IT is possisble to declare real variables with at least 10 decimal digits and a range extending to 10^30.

Question: Can anyone give an example here?

3) Processing of arrays:

In Fortran 90 , it is possible to treat arrays as a single object.

Suppose A,B and C are 10 x 10 arrays of real values.

we can write

A = 2* B + C

QUESTION: Can anyone give an example where parts of an array could be referenced?

4)Handling of Data Structures- This is fine

QUESTION) Can anyone give example of input/output features in Fortran 90?

Any other differences will be useful?

Please help
 
Technology news on Phys.org
  • #2
Do you still need these questions answered?
 

1. What is the difference between Fortran 77 and 90?

Fortran 90 is an updated version of Fortran 77, with added features and improved syntax. It includes new data types, dynamic memory allocation, and support for modules and object-oriented programming.

2. Can code written in Fortran 77 be used in Fortran 90?

Yes, code written in Fortran 77 can be compiled and run in Fortran 90 without any changes. However, Fortran 90 also allows for more modern and efficient coding techniques, so it is recommended to update older code to take advantage of these features.

3. Which version of Fortran is more commonly used?

Fortran 90 is more commonly used in modern scientific and engineering applications. However, there are still legacy codes written in Fortran 77 that are in use.

4. Are there any performance differences between Fortran 77 and 90?

Fortran 90 has the potential for better performance due to its improved syntax and features such as array operations and dynamic memory allocation. However, the actual performance may vary depending on the specific code and compiler used.

5. Can Fortran 90 be used for parallel programming?

Yes, Fortran 90 includes features for parallel programming, such as the ability to define parallel processing regions and synchronization between parallel tasks. This allows for more efficient use of modern computing architectures.

Similar threads

  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
22
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
3
Views
4K
  • Programming and Computer Science
Replies
7
Views
3K
  • Programming and Computer Science
Replies
17
Views
4K
  • Programming and Computer Science
Replies
8
Views
3K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
5
Views
3K
  • Programming and Computer Science
Replies
22
Views
4K
Back
Top