lecture3 - More on F90 Outline: I. Parameter statements II....

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: More on F90 Outline: I. Parameter statements II. Comments III. Program layout-- execution part IV. if/then/else V. Case statements VI. do loops VII. goto VIII. Intrinsic functions IX. Input/output X. Calling subroutines: call rs example XI. Array assignment XII. For the first project I. Parameter statements Not really parameters, but instead constants Can be integer, real, etc. REAL, PARAMETER :: pi=3.141592 INTEGER, PARAMETER :: MAX=100 Once set, parameters cannot be changed within your code! II. Comments Comments start with c or ! No function other than notes for programmer Still important! ! Program to compute eigenfunctions and eigenvalues ! for a particle in a one-dimensional potential Comments are especially important for anyone else who inherits your code! III. Program layout-- execution part PROGRAM program-name IMPLICIT NONE [specification part] [execution part] [subprogram part] END PROGRAM program-name The execution part is control statements, subroutine calls, functions, and intrinsic functions IV. If/then/else Control statement Can nest as many as one needs if (x<0) x=0 Just a single if statement no then or else:...
View Full Document

Page1 / 16

lecture3 - More on F90 Outline: I. Parameter statements II....

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online