cribsheet 3

cribsheet 3 - Fortran - line oriented - statements start at...

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

View Full Document Right Arrow Icon
Fortran - line oriented - statements start at col 7 upto col 72 - statement # b/n col 1-5 - blanks used for readability - comments start with C or * in col 1 - put any char except 0 in col 6 to cont line - first statement can be a PROGRAM <statement> - the physically last statement must be an end statement - no served words in fortran - will override any reserved words - not case sensitive data types -Integer, real, logical (only .true. or .false. stored), complex (pair of reals), characters (inside ' '), double precision (exponential form using the letter d rather than e) - character *n, n is the max number of chars Variables - can not be initialized during declaration - limited to 6 alphanumeric characters - first must be a letter - vars that start with I,J,K,L,M or N assumed to be integers unless declared otherwise - IMPLICIT NONE – gets rid of this assumption - type declarations must appear at the beginning of the program, before first executable statement, just like C Opening files open(unit = <integer>, file = <filename>, status = <old/new>)
Background image of page 1

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

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

Page1 / 3

cribsheet 3 - Fortran - line oriented - statements start at...

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

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