Fortran

toc
 * Home * Programming * Languages * Fortran**


 * Fortran** is a general purpose, [|procedural] and [|imperative] [|programming language]. Fortran was proposed and designed by [|John W. Backus] as alternative for the IBM 704 assembly language. A draft specification for the IBM mathematical **For**mula **Tran**slating System was completed by mid 1954. The first Fortran compiler appeared in 1957 and was the first widely used [|high-level programming language]. Successive versions have added varios features over the years, such as recursive routines and [|dynamic memory allocation] in [|Fortran 90]. Many early chess programs were written in Fortran.

=Punched card=
 * [[image:http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/FortranCardPROJ039.agr.jpg/800px-FortranCardPROJ039.agr.jpg link="http://en.wikipedia.org/wiki/Punched_card"]] ||
 * [|Punched card] from a Fortran program: Z(1) = Y + W(1) ||

=Sample Chess Code= A recursive Fortran 90 Alpha-Beta search routine : code format="fortran" RECURSIVE FUNCTION EVALUATE (ID, PRUNE) RESULT (RES) USE GLOBALS IMPLICIT INTEGER(A-Z) DIMENSION XX(0:26), YY(0:26), CC(0:26) LEVEL=LEVEL+1 BESTSCORE=10000*ID DO B=7,0, -1 DO A=7,0, -1 ! generate the moves for all the pieces ! and iterate through them IF (SGN(BOARD(B,A))/=ID) CYCLE CALL MOVELIST (A, B, XX, YY, CC, NDX) DO I=0,NDX,1 X=XX(I); Y=YY(I); C=CC(I) OLDSCORE=SCORE; MOVER=BOARD(B,A); TARG=BOARD(Y,X) ! make the move and evaluate the new position ! recursively. Targ holds the relative value of the piece ! allowing use to calculate material gain/loss CALL MAKEMOVE (A, B, X, Y, C)           IF (LEVELBESTSCORE) .OR. &              (ID>0 .AND. SCORE=PRUNE) .OR. &                 (ID>0 .AND. BESTSCORE<=PRUNE)) THEN BOARD(B,A)=MOVER; BOARD(Y,X)=TARG; SCORE=OLDSCORE LEVEL=LEVEL-1 RES = BESTSCORE RETURN END IF           END IF            BOARD(B,A)=MOVER; BOARD(Y,X)=TARG; SCORE=OLDSCORE END DO     END DO   END DO   LEVEL=LEVEL-1 RES=BESTSCORE RETURN END FUNCTION EVALUATE code

=See also=
 * IBM 704

=Publications=
 * P E Bryant and M J Baylis (**1968**). //[|FORTRAN - A Comparative Study]//. [|Literature: Reports] hosted by Atlas Computer Laboratory
 * James Gillogly (**1970**). //[|MAX : A FORTRAN Chess Player]//. [|RAND] paper
 * [|John Backus] (**1978**) //[|The history of Fortran I, II, and III]//. in [|Richard L. Wexelblat] (ed) [|History of programming languages I]
 * [|Alfio Marazz], Johann Joss, [|Alex Randriamiharisoa] (**1993**). //[|Algorithms, routines, and S functions for robust statistics: the FORTRAN library ROBETH with an interface to S-PLUS]//. Wadsworth And Brooks/Cole Statistics/Probability Series, [|amazon]

=External Links=
 * [|Fortran from Wikipedia]
 * [|Cray Blitz FTP Page] crayblitz.tar.gz Source Code, by Robert Hyatt
 * [|Microsoft® FORTRAN Version Features]
 * [|Intel Fortran Compiler]
 * [|History of FORTRAN and FORTRAN II — Software Preservation Group] from The Computer History Museum
 * [|Fortran FAQ]
 * [|comp.lang.fortran] Discussion about Fortran

=References= =What links here?= include page="Fortran" component="backlinks" limit="120"
 * Up one Level**