13.07.2015 Views

A Brief Introduction to Fortran 77 - Polaris

A Brief Introduction to Fortran 77 - Polaris

A Brief Introduction to Fortran 77 - Polaris

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VariablesVariables in <strong>Fortran</strong> <strong>77</strong> start with a letter, contain only lettersand digits, and are no more than six characters long. In <strong>Fortran</strong>90 up <strong>to</strong> 31 characters are allowed and the underscore _ canform part of the variable name.The type of variables is specified either explicitly in a typedeclaration statement or is implicit. Examples of typedeclaration statements:real a,b,c(10,10)integer i,j,k(100)double precision ...complex ...logical q, p rcharacter s,t * 5,u(20,20)character * 10 v, w, yThe * num in the character statement specifies the length ofthe variable in number of characters. It applies <strong>to</strong> the whole listif it appears after the character keyword, or <strong>to</strong> the variable ifit appears after a variable name.© 1998 David A. Padua10 of 118

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

Saved successfully!

Ooh no, something went wrong!