Storing FORTRAN Program Code on Punch Cards
This section provides a quick introduction of syntax rules of early versions of FORTRAN language related to punch cards used to store FORTRAN program codes.
Programs written in early versions of FORTRAN language must follow special rules that
were related the punch cards used to store program codes in the early days:
- One code line is recorded on one punch card.
- A punch card has 80 columns.
- Columns from 73 to 80 are used to record a sequence number of each card.
- Each card can not record more than 1 statement.
- FORTRAN statement code must be written in columns from 7 to 72.
- Columns 1 to 5 are used to enter numbers to identify statements
to be referenced in GOTO, DO, READ, and WRITE statements.
- Column 6 is used to mark a card to continue a long statement from the previous card.
- A letter "C" in column 1 indicates that this card contains a comment, not a FORTRAN statement.
Here is a sample code of an early version of FORTRAN LANGUAGE:
C---- THIS PROGRAM READS INPUT FROM THE CARD READER,
C---- 3 INTEGERS IN EACH CARD, CALCULATE AND OUTPUT
C---- THE SUM OF THEM.
100 READ(5,10) I1, I2, I3
IF (I1.EQ.0 .AND. I2.EQ.0 .AND. I3.EQ.0) GOTO 200
ISUM = I1 + I2 + I3
WRITE(6,20) I1, I2, I3, ISUM
20 FORMAT(7HSUM OF , I5, 2H, , I5, 5H AND , I5,
* 4H IS , I6)
The picture below shows a punch card representing one line of a FORTRAN program
Table of Contents
About This Book
►1957 - FORTRAN Language Developed by IBM
What Is FORTRAN?
►Storing FORTRAN Program Code on Punch Cards
FORTRAN 66 - Example Program Code
FORTRAN 77 - Example Program Code
g77 - GNU Project FORTRAN Compiler
Fortran 90 - Example Program Code
1970 - UNIX Operating System Developed by AT&T Bell Labs
1971 - FTP Protocol Created by Abhay Bhushan
1972 - C Language Developed by Dennis Ritchie
1976 - vi Text Editor Developed by Bill Joy
1977 - Apple II Designed by Steve Jobs and Steve Wozniak
1977 - The Bourne Shell Developed by Stephen Bourne
1978 - The C Shell Developed by Bill Joy
1978 - Bash (Bourne-Again Shell) Developed by Brian Fox
1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer
1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman
1984 - Macintosh Developed by Apple Inc.
1984 - X Window System Developed a MIT Team
1991 - WWW (World Wide Web) Developed by Tim Berners-Lee
1991 - Gopher Protocol Created by a University of Minnesota Team
1995 - Java Language Developed by Sun Microsystems
1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf
2002 - .NET Framework Developed by Microsoft
PDF Printing Version