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.

Arithmetic operators<br />

• e.g., what does a+b*c**3 mean<br />

– ((a+b)*c)**3 a+(b*c)**3 etc.<br />

– No! correct is: a+(b*(c**3))<br />

– priority is **, (* or /) then (+ or -)<br />

• Also LOGICAL operators, <strong>in</strong> this priority:<br />

– .not., .and., .or., (.eqv. or .neqv.)<br />

• Be careful mix<strong>in</strong>g variable types (e.g.<br />

<strong>in</strong>teger & real) <strong>in</strong> the same expression!

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

Saved successfully!

Ooh no, something went wrong!