15.02.2015 Views

Numerical Modelling in Fortran: day 2

Numerical Modelling in Fortran: day 2

Numerical Modelling in Fortran: day 2

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Miscellaneous th<strong>in</strong>gs<br />

• Cont<strong>in</strong>u<strong>in</strong>g l<strong>in</strong>es:<br />

– f95 use ‘&’ at the end of the l<strong>in</strong>e<br />

– f77: put any character <strong>in</strong> column 6 on next l<strong>in</strong>e<br />

• Formats of constants:<br />

– Use ‘.’ to dist<strong>in</strong>guish real from <strong>in</strong>teger (avoid 2/3=0 !)<br />

– 1.234x10 -13 is written as 1.234e-13<br />

• logical variables have 2 values: .true. or .false.<br />

• Variable nam<strong>in</strong>g rules:<br />

– start with letter<br />

– mix numbers, letters and _<br />

– no spaces

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!