Intel fortran-80 manual FORTRAN Statement Elements, Character Set

Models: fortran-80

1 130
Download 130 pages 742 b
Page 15
Image 15
2.2 FORTRAN Statement Elements

FORTRAN-80

FORTRAN Concepts

2.2 FORTRAN Statement Elements

A FORTRAN statement can include the following elements:

Statement identifier (keyword), such as PROGRAM or INTEGER

Function identifiers, such as SQRT(A) or FLOAT(I)

Constants, such as 3.142857 or 'STRING'

Variables, such as A or AB

Operators, such as * or .AND.

Combinations of the above into value assignments, such as X = y*Z, or into mathematical expressions, such as A *B + SQRT(C)

Statement and function identifiers are the subjects of Chapters 3-6. Constants, variables, operators, and expressions are described in the remainder of this chapter and in Chapter 3.

2.2.1 Character Set

The FORTRAN-80 character set consists of the alphabetic characters A-Z, the digits

0-9, and the special characters listed below. The set ofcnar&ctetsreptesentable in the pr~5~ss~~1~9ItliJ~~t~~p:r~rl~iqg·••~..~~••~I.gr~l?hi¢s~A9th~blan~cryar~cter'. The·. col*

l~t~ng.sequ¢nce()fthe¢h~(actersisthat of~he·AS~TTqhaT(\cter$et(Appendix· E).

SPECIAL CHRACTERS

Blank

=Equal Sign + Plus

Minus

*Asterisk

/Slash

(

Left Parenthesis

)

Right Parenthesis

 

Comma

 

Period

 

Single Quote

$

Dollar Sign

#Pol.1ndSign

Generally, blanks have no meaning in a FORTRAN statement and should be used to improve program readability. For example,

A = 8*C + (D* *2/E)

and

A 8*C + (D* *2/E)

are equivalent statements.

Blanks are counted in the total characters allowed in a FORTRAN statement, however. They are also significant in character strings and in column 6 of the stan- dard line format. They are not counted in the memory space occupied by a program.

2-3

Page 15
Image 15
Intel fortran-80 manual FORTRAN Statement Elements, Character Set