(3I3,F9.6) Fortran source code

  • Context: Fortran 
  • Thread starter Thread starter Rajini
  • Start date Start date
  • Tags Tags
    Code Fortran Source
Click For Summary

Discussion Overview

The discussion revolves around Fortran source code formatting, specifically focusing on format specifications like (3I3,F9.6), G12.6, and A8. Participants also raise questions about coding practices in Fortran, including function input across multiple lines, runtime calculation, graphing program speed, algorithm complexity, and summation involving variables.

Discussion Character

  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • Some participants explain that (3I3,F9.6) represents a format for three integers (each with up to three digits) followed by a floating-point number (up to nine digits, with up to six after the decimal).
  • Another participant requests clarification on G12.6 and A8 formats, seeking examples for each format.
  • One participant interprets 3I3 as representing specific integers, providing an example of 126, 128, and 133.
  • A participant raises a question about how to input a function that exceeds 72 columns in multiple lines, sharing an example function.
  • Another participant suggests using \ or & to continue lines in Fortran.
  • Several questions are posed regarding calculating user runtime in Fortran 90, graphing speed comparisons between programs, and determining algorithm complexity with examples.
  • A participant inquires about performing a summation while keeping certain variables constant.

Areas of Agreement / Disagreement

Participants generally agree on the interpretation of the format specifications discussed, but multiple questions remain unresolved, particularly regarding coding practices and algorithm analysis.

Contextual Notes

Some questions may depend on specific Fortran versions or compiler behaviors, and the discussion includes various assumptions about coding practices that are not universally applicable.

Who May Find This Useful

Readers interested in Fortran programming, particularly those dealing with format specifications, coding practices, and performance analysis in their programs.

Rajini
Messages
619
Reaction score
4
what does this mean..i saw this in Fortran source code!
(3I3,F9.6)
thanks.
 
Technology news on Phys.org


That is a string formated as 3 integers with up to 3 digits, followed by a floating point number with up to 9 digits, up to 6 of them being to the right of the decimal point.
 


thanks Hall..
another doubt..
What is G12.6, A8 Format?
Please give me 1 e.g., for each (also for 3I3.). Now F9.6 is very clear.
thanks
 


3I3
means
126,128,133 these are three integers which represent 3 and having three digit in each of them which say I3
 


Hi, thank you!...
 


Since he has had his question answered, and my question relates to this topic, I'll post my question here.

I'm constrained to 72 columns to input my code. How do I input a function in multiple lines?

e.g:

f(y)=sin(y)+cos(y)

I have tried:

f(y)=sin(y)
f(y)=f(y)+cos(y)

The function I'm using exceeds the 72-column mark.
 


you can use \ or & for getting multiple lines
 


Few questions about Fortran

1. How can i calculate the user run time for my program , i am using fortran 90 and gfortran as compiler

2. How to draw the graph between the speed of two different programmes

3. Suppose i have a algorithm then how to calculate the complexity of algorithm, like whether my program is O (N^2) or O(N LOG N) ...if some one can explain this with small example then it will be very helpfull

Thanks
 


I want to calculate temperature and the solution contains sum from 1.100 and also contains x and y variables in sum. how can i make a do of the sum but maintain x and y variables constant.
 

Similar threads

Replies
64
Views
10K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
823
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K