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