1*43083Scael.\" Copyright (c) 1990 The Regents of the University of California. 2*43083Scael.\" All rights reserved. 319454Smckusick.\" 4*43083Scael.\" %sccs.include.redist.man% 5*43083Scael.\" 6*43083Scael.\" @(#)ratfor.1 6.2 (Berkeley) 06/11/90 7*43083Scael.\" 8*43083Scael.Dd 9*43083Scael.Dt RATFOR 1 10*43083Scael.Os ATT 7th 11*43083Scael.Sh NAME 12*43083Scael.Nm ratfor 13*43083Scael.Nd rational Fortran dialect 14*43083Scael.Sh SYNOPSIS 15*43083Scael.Nm ratfor 16*43083Scael.Op Ar option ... 17*43083Scael.Op Ar filename ... 18*43083Scael.Sh DESCRIPTION 19*43083Scael.Nm Ratfor 2019454Smckusickconverts a rational dialect of Fortran into ordinary irrational Fortran. 21*43083Scael.Nm Ratfor 2219454Smckusickprovides control flow constructs essentially identical to those in C: 23*43083Scael.Tw Fl 24*43083Scael.Tp statement grouping: 2519454Smckusick{ statement; statement; statement } 26*43083Scael.Tp decision-making: 27*43083Scael.Ds I 28*43083Scaelif (condition) statement { else statement } 2919454Smckusickswitch (integer value) { 30*43083Scael\tcase integer: statement 31*43083Scael\t... 32*43083Scael\t[default]: statement 3319454Smckusick} 34*43083Scael.De 35*43083Scael.Tp loops: 36*43083Scael.Ds L 3719454Smckusickwhile (condition) statement 3819454Smckusickfor (expression; condition; expression) statement 3919454Smckusickdo limits statement 40*43083Scaelrepeat statement [until (condition)] 4119454Smckusickbreak 4219454Smckusicknext 43*43083Scael.De 44*43083Scael.Tp 45*43083Scael.Pp 4619454Smckusickand some syntactic sugar to make programs easier to read and write: 47*43083Scael.Tw Fl 48*43083Scael.Tp free form input: 4919454Smckusickmultiple statements/line; automatic continuation 50*43083Scael.Tp comments: 5119454Smckusick# this is a comment 52*43083Scael.Tp translation of relationals: 5319454Smckusick>, >=, etc., become .GT., .GE., etc. 54*43083Scael.Tp return (expression) 5519454Smckusickreturns expression to caller from function 56*43083Scael.Tp define: 5719454Smckusickdefine name replacement 58*43083Scael.Tp include: 5919454Smckusickinclude filename 60*43083Scael.Tp 61*43083Scael.Pp 62*43083Scael.Nm Ratfor 6319454Smckusickis best used with 64*43083Scael.Xr f77 1 . 65*43083Scael.Sh SEE ALSO 66*43083Scael.Xr f77 1 6719454Smckusick.br 6819454SmckusickB. W. Kernighan and P. J. Plauger, 69*43083Scael.Em Software Tools , 70*43083ScaelAddison-Wesley, 71*43083Scael1976. 72*43083Scael.Sh HISTORY 73*43083Scael.Nm Ratfor 74*43083Scaelappeared in Version 7 AT&T UNIX. 75