FORTRAN-SO Programming Manual
 Prompt
 Preface
Page
 Contents
 Illustrations
Chapter Programming Guidelines
 Glossary
 FORTRAN-SO
 Comment Lines
Chapter Introduction to Fortran
An Introductory Example
 Type Statement
Input Statements
Value Assignment Statement
Output Statements
 Summary Of FORTRAN·SO Statements
Program Termination
Executable Statements
Nonexecutable Statements
 Order of Statements
Format
 Fortran Program Structure
Program Units and Procedures
Chapter Fortran Concepts
 Program name
Prog RAM Statement
Statements and Lines
 Fortran Statement Elements
Character Set
#Pol.1ndSign
= 8*C + D* *2/E
 Constants and Variables
B52
 Arithmeticoverflow Error Murphyslaw
 Where
+64101 #14010
#4567Q +#AF2CH
Sl#d ...b
 Sperim = 4*S Sqarea = S**2
Sqdiag = Sqrt 2*S* *2
 Relational Expressions
 If Numb .GT Stop If Pname .EO. Gehrigprint 20, PNAME, AVG
EXP1 operator EXP2
EXP1 EXP2 operator
OP1 NOT.OP1 True False False True
 Stop
 Precedence of Operators
OP1 OP2 OP1 .NEQV. OP2
 Scope of Symbols
15/3 + 18/9 = 5 + 2 = 15/3 + 18/9 = 15/3 + 2 = 15/5 =
 Call ROUT1A, 3.72
Notational Conventions
Call sub arg,arg
Page
 Chapter Defining Variables ARRAYS, and Memory
Type Statements
Real Type Statement
Integer Type Statement
 Logical Type Statement
Va,luernustueiA, Qp4
 Character * len, name ,name
Len Aryd* len
 Array Definition
Implicit REALA-B, D-H, Character C
Implicit Integer I-N, Logical O-l
Character TICTAC3,3 Logical ,3,3
 Dimension Statement
Logical Table Integer Array Dimension ,3, ARRAY3,3,3
Kinds of Array Declarators
ARRAY3,MI00LE,THIRD
 Dimension ,3
Properties of Arrays
Referencing Array Elements
Ary s ,s
 Assignment Statements
ARRAY2,6 = a Arrayi + J, 3 = ARRAYM,M + N,M-N = a + SQRT8
 Arithmetic Assignment Statement
 = exp
Logical FLAG, ,3
= char
CHARACTER*10 NAMES4, MGR MGR = Stengel NAMES1 = Gehrig
 Data Statement
Assign stlTO name
Assign 1010 to LOOP1 Goto LOOP1
R*c
 Data Zeros 110*0/1,J,K 110,20,301 &NAMES2 Iotti
Equivalence Statement
Data I,J,K/10,20,301
 Common Statement
Real Fpnumb
Array List
Fpnumb
 Block Data Subprograms
 ZEROS/1 0
Block Data Statement
Block Data name
 Program Execution Controls
Transferring Program Oontrol
Unconditional GO to Statement
Computed GO to Statement
 Assign 10TO Start Gotostart Assign 999 to Done
Assigned GO to Statement
Arithmetic if Statement
 Logical if Statement
6 IF, Else IF, and Else Blocks
Done = a * *2 .GT **2
If Done Pause If .NOT. Done GO to Start
 Block if Statement
Else if Statement
If exp then
Else if exp then
 Else Statement
END if Statement
If Flag .EO then
Else if Flag .EO then Write 6,40 Fedtax
 Do Statement
Loop Control Statements
Operation of a do Loop
 Program Termination Statements
Continue Statement
Continue
CHARACTER*12 Pname
 Pause Statement
Stop Statement
Pause
Pause BREAK12
 Intrinsic Functions
Chapter Functions and Subroutines
Intrinsic and Statement Functions
 Intri Nsic Statement
Statement Functions
Intrinsic tunc ,tunc
Intrinsic Sqrt Intrinsic EXP, LOG, LOG10
 156.8
 External Procedures
Function Statement
 Subroutines
Function Subprogram Limitations
Do 100 K = 1
Total = Total + Arrayk 100CONTINUE Return END
 Subroutine Statement
Retu RN Statement
Program CALL.. Subroutine
SU Brouti N E subdum,dum
 Save Statement
External Statement
Save lebl ,Iebl
External proe ,proe
 Arguments And Common Blocks Revisited
Call Statement
 Association Of Arguments
Common Blocks
Dummy And Actual Arguments
 Agreement Of Argument Lengths
 FX, Y
Function FA,B,C
Page
 Chapter INPUT/OUTPUT
Records, Files, And Units
Record Properties
File Properties
 File Existence
File Name
File Position
External And Internal Files
 File Access
Unit Properties
 File-Handling Statements
Open Statement
Unit Specifier
1.2 1/0 Status Specifier
 File Status Specifier
Error Specifier
File Name Specifier
 Access Method Specifier
Access = Sequential
Access = SEQUENTIAL,FORM = Formatted
Formatting Specifier
 Open 3, FILE=CARDS,STATUS=NEW,ACCESS=DIREcr
Blank Specifier
Form = FORMATTED,RECL=80
Blank = blnk
 Close Statement
Opening a Connected Unit
Close close-list
Close 3, IOSTAT= ERRFLG, ERR=
 Backspace Statement
Rewi N D Statement
File Disposition Specifier
Backspace
 Data-Transfer 1/0 Statements
Endfile Statement
Read Statement
Endfile arg-list
 FMT =f
Control Information List
Read 2 PNAME, AB, Hits
 Assign 25 to Infmt Read 2,INFMT Pname
Read 2,25 PNAME, AS, Hits
Read 25, Pnam E, AS, Hits
 Write ctl-list out-list
Input List
Implied-DO List
 Formatted And Unformatted Data Transfer
Print Statement
Unformatted Data Transfer
Print 120, PNAME, AVG
 Formatted Data Transfer
Printing Formatted Records
 Format Statement
Stl Format flist
 Is Ff
 ± Y1 Y2···Ye
OY1 Y2
Y1 Y2 Y3
 Either a sjgu ora letter indicatingthebas¢
Z5editdesctiptor
 Format 1X, A12, 4X, F4.3
Write 7,100 Itstno Format Thisis the Test NUMBER,2X
Write 7,100
 Read 2,50 INTNUM, Fpnum
DollytSigfjl$ijitrrrg·
 List·Directed Formatting
List-Directed Input
Paint 25, Pname
Format A20, $
 List-Directed Output
Page
 Problem Definition
Chapter Programming Guidelines
Program Development
Program Documentation
 Level Two
Refining The Problem Definition
Level One
 Otherwise Print Employee Data and Update Totals Else
Final Coding
Level Three
Write unit, 60 EMP, HRS, GRPAY, Netpay Format flist
 Fortran Coding
Functions And Subroutines
GO to Statement
Crossing Unit Lines
 References
Reminders
= 2217*r* *2
PI =
 Programming Guidelines
 Statement Summary
Appendix a FORTRAN-80 Statement Summary
Statement Sequence
 ERR = stl
 Iostat =
Stname
Status =
Stat
 Continue execution provides
 END
 FORTRAN-80
 FORTRAN-80
 FORTRAN-SO
 Iostat =
 Return
 Rewind Statement
 Subroutine Statement Category Executable Text Reference .2.2
 Appendix B Intrinsic Functions
Intrinsic Function Summary
 Category Function Arguments
 Int-12.8 =
Page
 Appendix C Hollerith Data Type
Hollerith As a Data Type
Hollerith Constant
Hollerith Constants In Data Statements
 Hollerith Format Specification
AEditing Of Hollerith Data
 Nonstandard Extensions To 1977 Fortran
Appendix D Extensions to Ansi Fortran
Standard Extensions To 1977 Subset
 More Specific Semantics Than 1977 Fortran
Differences From 1966 Fortran
 FORTRAN-80
Page
 Ascii Codes
Ascii Codes
Page
 Compiler Extensions
Appendix F 8080/8085 Processor Dependencies
Processor Limitations On Language
 Where the $must be in column
Call Input port, var Call Output port, exp
Call INPUT1, TEST1 Call OUTPUT2
$REENTRANT
 Default Data Lengths
Interpretation of do Statements
Including Source Files
$0077
 Unit n = device
F1MYPROG UNIT4 LP, Unit 5 Fosysin
 Index
 Block Data Function Subroutine
 Index
Page
Page
Page
 Inter
 WED Like Your Comments
Postage will be paid by Addressee
 Request for Readerscomments
 111111
Page
 Inter