Intel fortran-80 Summary Of FORTRAN·SO Statements, Program Termination, Executable Statements

Models: fortran-80

1 130
Download 130 pages 742 b
Page 11
Image 11

FORTRAN-SO

Introduction To FORTRAN

Statement 20, the FORMAT statement, indicates the 'PNAME' field will be a string of characters of variable length, as in the FORMAT statement labeled 10. The name will be followed by five blanks (5X) and then the batting average will be printed. The 'A VG' field consists of four floating-point digits -- one integer digit and three decimal digits.

1.1.6 Program Termination

The final statement terminates the program. The END statement is an indicator to the FORTRAN compiler that it hasTeached the end of the program. Every program unit must be terminated by an END statement.

1.2 Summary Of FORTRAN·SO Statements

The statements available in FORTRAN-80 are listed below according to their main classifications. These include all statements available in the FORTRAN 77 subset and some from the FORTRAN 77 full language. To simplify comparison, the statements are listed in the same sequence as in Section 7 of the ANSI standard. All chapter references are to this manual, however, not to the ANSI standard.

Statements are classified as executable or nonexecutable. Executable statements do calculations, read or write 110 data, and control program execution. Nonex- ecutable statements define the characteristics or value of data and define program units.

1.2.1 Executable Statements

1.Arithmetic, logical, and character assignment statements; ASSIGN statement (Chapter 3);

2.Unconditional, assigned, and computed GO TO statements (Chapter 4);

3.Arithmetic and logical IF statements (Chapter 4);

4.Block IF, ELSE IF, ELSE, and END IF statements (Chapter 4);

5.CONTINUE statement (Chapter 4);

6.STOP and PAUSE statements (Chapter 4);

7.DO statement (Chapter 4);

8.READ, WRITE, and PRINT statements (Chapter 6);

9.REWIND, BACKSPACE, ENDFILE, OPEN, and CLOSE statements (Chapter 6);

10.CALL and RETURN statements (Chapter 5);

11.END statement (Chapter 4).

1.2.2 Nonexecutable Statements

1.PROGRAM (Chapter 2), BLOCK DATA (Chapter 3), FUNCTION, and SUBROUTINE (Chapter 5) statements;

2.DIMENSION, COMMON, EQUIVALENCE, IMPLICIT (Chapter 3), EXTERNAL, INTRINSIC, and SAVE (Chapter 5) statements;

3.INTEGER, REAL, LOGICAL, CHARACTER type statements (Chapter 3);

4.DATA statement (Chapter 3);

5.FORMAT statement (Chapter 6);

6.Statement function statement (Chapter 5).

1-3

Page 11
Image 11
Intel fortran-80 Summary Of FORTRAN·SO Statements, Program Termination, Executable Statements, Nonexecutable Statements