1.\" Copyright (c) 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)ratfor.1 6.2 (Berkeley) 06/11/90 7.\" 8.Dd 9.Dt RATFOR 1 10.Os ATT 7th 11.Sh NAME 12.Nm ratfor 13.Nd rational Fortran dialect 14.Sh SYNOPSIS 15.Nm ratfor 16.Op Ar option ... 17.Op Ar filename ... 18.Sh DESCRIPTION 19.Nm Ratfor 20converts a rational dialect of Fortran into ordinary irrational Fortran. 21.Nm Ratfor 22provides control flow constructs essentially identical to those in C: 23.Tw Fl 24.Tp statement grouping: 25{ statement; statement; statement } 26.Tp decision-making: 27.Ds I 28if (condition) statement { else statement } 29switch (integer value) { 30\tcase integer: statement 31\t... 32\t[default]: statement 33} 34.De 35.Tp loops: 36.Ds L 37while (condition) statement 38for (expression; condition; expression) statement 39do limits statement 40repeat statement [until (condition)] 41break 42next 43.De 44.Tp 45.Pp 46and some syntactic sugar to make programs easier to read and write: 47.Tw Fl 48.Tp free form input: 49multiple statements/line; automatic continuation 50.Tp comments: 51# this is a comment 52.Tp translation of relationals: 53>, >=, etc., become .GT., .GE., etc. 54.Tp return (expression) 55returns expression to caller from function 56.Tp define: 57define name replacement 58.Tp include: 59include filename 60.Tp 61.Pp 62.Nm Ratfor 63is best used with 64.Xr f77 1 . 65.Sh SEE ALSO 66.Xr f77 1 67.br 68B. W. Kernighan and P. J. Plauger, 69.Em Software Tools , 70Addison-Wesley, 711976. 72.Sh HISTORY 73.Nm Ratfor 74appeared in Version 7 AT&T UNIX. 75