Professional Documents
Culture Documents
Character Meaning
0, 1, 2……….,9 Decimal digits
A,B,C……..Z Upper –case
letters
$ Dollar sign
‘ Apostrophe (single quote)
( Left parenthesis
) Right parenthesis
* Asterisk
+ Plus sign
- Minus sign
/ Slash
, Comma
. Period (decimal point)
: Colon
= Equal sign
b Blank or space
Classes of Data
Computer programs,
regardless of language in
which they are written, are
designed manipulate data of
some kind. FORTRAN
provides for two classes of
data- Constants and variables.
Constants
A2X3
ITEM
PAY DAY
For example-
IABC, MASS, MM2
Real variables:-
For example-
AREA, DENSITY, and A2B3
FORTRAN Statements and
Columns
FORTRAN statements are column-
oriented. The line on which a
FORTRAN statement is written
can be considered as being
divided into columns, numbered
from the left, with one character
allowed in each column.
1. Column 1 can contain a C. Whatever
follows after this will be treated as a
comment and will not undergo any
execution at program run time.
Negative
Alog10(x) log10(x) x must be real
but not zero
Or negative
cos(2nπ+x) cos(2*n*3.14+x)
Layout of a FORTRAN Program
DO statements
IF statements
CALL statements
Progress statements
CONTINUE statements
STOP statements
Last statement End
Examples
REAL Divisor, Max, Theta