by Nasser
M. Abbasi
character set:
the 26 upper-case letters |
A B C ... X Y Z |
the 10 digits |
0 1 2 3 4 5 6 7 8 9 |
and 13 special characters: |
|
+ |
plus |
- |
minus |
* |
asterisk |
/ |
slash |
|
blank |
|
equals |
( |
left parenthesis |
) |
right parenthesis |
. |
decimal point |
, |
comma |
' |
apostrophe |
: |
colon |
$ |
currency symbol |
|
|
· columns 1 to 5 form the label field,
· column 6 forms the continuation marker field,
· columns 7 to 72 form the statement field.
PROGRAM, FUNCTION, SUBROUTINE, BLOCK DATA |
||
|
|
IMPLICIT |
|
PARAMETER |
Type statements: |
|
|
INTEGER, REAL, DOUBLE PRECISION, |
|
|
COMPLEX, LOGICAL, CHARACTER |
|
|
Other specification statements: |
|
|
COMMON, DIMENSION, EQUIVALENCE, |
|
|
EXTERNAL, INTRINSIC, SAVE |
FORMAT |
|
Statement function statements |
|
DATA |
Executable statements: |
|
|
BACKSPACE, CALL, CLOSE, CONTINUE, DO, |
|
|
ELSE, ELSE IF, END IF, GO TO, IF, |
|
|
INQUIRE, OPEN, READ, RETURN, REWIND, |
The table below summarises the properties of the six data types provided in Standard Fortran:
Data type |
Characteristics |
|
|
Integer |
Whole numbers stored exactly. |
Real |
Numbers, which may have fractional parts, stored using a floating-point representation with limited precision. |
Double Precision |
Similar to real but with greater precision. |
Complex |
Complex numbers: stored as an ordered pair of real numbers. |
Logical |
A Boolean value, i.e. one which is either true or false. |
Character |
A string of characters of fixed length. |
Type statements must precede all executable statements in the unit;
If an operator has two operands of the same data type then the result has the same type. If the operands have different data types then an implicit type conversion is applied to one of them to bring it to the type of the other. These conversions always go in the direction which minimises loss of information:
integer converts to real converts to complex or double precision |
http://www.fortran.com/fortran/F77_std/rjcnf0001.html