Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ratfor(1) [bsd man page]

RATFOR(1)						      General Commands Manual							 RATFOR(1)

ratfor - rational Fortran dialect SYNOPSIS
ratfor [ option ... ] [ filename ... ] DESCRIPTION
Ratfor converts a rational dialect of Fortran into ordinary irrational Fortran. Ratfor provides control flow constructs essentially iden- tical to those in C: statement grouping: { statement; statement; statement } decision-making: if (condition) statement [ else statement ] switch (integer value) { case integer: statement ... [ default: ] statement } loops: while (condition) statement for (expression; condition; expression) statement do limits statement repeat statement [ until (condition) ] break next and some syntactic sugar to make programs easier to read and write: free form input: multiple statements/line; automatic continuation comments: # this is a comment translation of relationals: >, >=, etc., become .GT., .GE., etc. return (expression) returns expression to caller from function define: define name replacement include: include filename Ratfor is best used with f77(1). SEE ALSO
f77(1) B. W. Kernighan and P. J. Plauger, Software Tools, Addison-Wesley, 1976. 7th Edition April 29, 1985 RATFOR(1)

Check Out this Related Man Page

EFL(1)							      General Commands Manual							    EFL(1)

efl - Extended Fortran Language SYNOPSIS
efl [ option ... ] [ filename ... ] DESCRIPTION
Efl compiles a program written in the EFL language into clean Fortran. Efl provides the same control flow constructs as does ratfor(1), which are essentially identical to those in C: statement grouping with braces; decision-making with if, if-else, and switch-case; while, for, Fortran do, repeat, and repeat...until loops; multi-level break and next. In addition, EFL has C-like data structures, and more uniform and convenient input/output syntax, generic functions. EFL also provides some syntactic sugar to make programs easier to read and write: free form input: multiple statements/line; automatic continuation statement label names (not just numbers), comments: # this is a comment translation of relationals: >, >=, etc., become .GT., .GE., etc. return (expression) returns expression to caller from function define: define name replacement include: include filename The Efl command option -w suppresses warning messages. The option -C causes comments to be copied through to the Fortran output (default); -# prevents comments from being copied through. If a command argument contains an embedded equal sign, that argument is treated as if it had appeared in an option statement at the beginning of the program. Efl is best used with f77(1). SEE ALSO
f77(1), ratfor(1). S. I. Feldman, The Programming Language EFL, Bell Labs Computing Science Technical Report #78. 7th Edition April 29, 1985 EFL(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

wildcards with if statement?

Hello i am trying to use the wildcards with the if statement but it is displaying the error like this one if * | ** | * ] Any body can help me to for using the wild card option in the if case but i have used this code and working well with the case statement to enter the name without the... (14 Replies)
Discussion started by: murtaza
14 Replies

2. Linux

error in if statement

Hi , I am getting an error when I run the script for checking word "view" in a file . I am using if statement. like this if then VW_VAR=` cat $TN.${ecmdate}.sql1 | grep -i view | awk '{print $3}' | cut -d '.' -f2 ` echo " VW_$VW_VAR " sed -e... (16 Replies)
Discussion started by: capri_drm
16 Replies

3. UNIX for Dummies Questions & Answers

Y or N in a Shell

Hello , ran into a problem "I am using Vi," and Im mid way down in a BASH and Im trying to simply make a statement along the lines of simply Would you like to check the system , Y or N And run these functions when the Y or yes is given cat /etc/passwd | wc -l who | wc -l ps... (14 Replies)
Discussion started by: Producer
14 Replies

4. Shell Programming and Scripting

IF statement failure

Hi Guys, i have a variable which hold a string value of "in" when i try to compare this value against another value the if statement is not working. $a=in if then echo "Not a Walid match" else echo "Walid Match" fi Thank You. (9 Replies)
Discussion started by: nitinrp1
9 Replies

5. Shell Programming and Scripting

Case statement w/count

Hello all, I am trying to create a script that can read a file and produce a count per date (such as a case statement of some kind): This is a sample of the data: 05-01 02 05-01 02 05-01 02 05-01 02 05-01 02 05-01 02 05-01 02 05-01 03 05-01 03 05-01 03 05-01 03 05-01 03 05-01... (13 Replies)
Discussion started by: riker
13 Replies

6. Shell Programming and Scripting

Select variable within a if statement

i want to select a variable created and use it in a if statement, but not getting the desired results LINE='device for 0101a01: lpd://' prt=`echo $LINE | awk '{print $3 }' | cut -c 1-7` echo $prt My if statement to select just what i want.. IFS=$":" while read prt... (11 Replies)
Discussion started by: ggoliath
11 Replies

7. Shell Programming and Scripting

Pass a DDL statement to a KSH script

I need to pass a DDL statement into a ksh script & parse the statement. What is the best way to pass a DDL statement into a KSH script. ---------- Post updated at 09:28 AM ---------- Previous update was at 07:35 AM ---------- if the name of the script is test.ksh test.ksh "ALTER TABLE... (12 Replies)
Discussion started by: gayathree
12 Replies

8. Shell Programming and Scripting

Dates not comparing correct even the same format

I have the date of the file passed into a variable also current date formatted same passed into a separate variable and compare the two with an if statement and statement always comes up false. Even though I verified the dates. Any help would be awesome. Filecrtdate=`ls -l $i | awk '{print... (19 Replies)
Discussion started by: coderanger
19 Replies

9. Shell Programming and Scripting

Multiple conditions in a CASE statement

is it possible to use multiple conditions in a CASE statement? And if so, what is the syntax? I'm trying to use one but can't seem to get it right. I want the statement to be CASE $vendor OR $alias condition 1) statements; condition 2) statements; etc. esac but I keep... (25 Replies)
Discussion started by: Straitsfan
25 Replies

10. Homework & Coursework Questions

K&R C code edits

1. The problem statement, all variables and given/known data: 2. Relevant commands, code, scripts, algorithms: We have to do this using 'unix tools' and not use the script as if it were C. Meaning, he wants more uses of grep, sed, awk, cut, etc... than he does while, for, do's and done's.... (23 Replies)
Discussion started by: theexitwound
23 Replies

11. Shell Programming and Scripting

If condition and for loop within sed statement

Hi, I tried to go through a lot of online material but could not find concrete solution. My issues is like this : I've got a input file like this : <a> <startDate>19700101000000</startDate> <endDate>20300101000000</endDate> </a> ... (12 Replies)
Discussion started by: Shaishav Shah
12 Replies

12. Shell Programming and Scripting

awk doesn't understand 'read' statement!!!

While working on awk programming, i found that it doesn't understand 'read' statement. Then what's the use of 'continue' and 'break' statement in awk. For ex: awk '{k=1; while (k<10) {print $0; k++}}' emp.lst Now, please say if I want to put the logic that after priting 1 line, it will ask for... (13 Replies)
Discussion started by: ravisingh
13 Replies

13. Shell Programming and Scripting

[Solved] 0403-057 Syntax error for if statement

I am getting the following error when I am running a script in ksh when trying to execute an if statement comparing two numerical values 1.5321e+08: 0403-057 Syntax error Below is my code snippet. #!/bin/ksh set -x TODAY=$(date +%y%m%d) for file in $(ls -rt *.log | tail... (11 Replies)
Discussion started by: kiran1112
11 Replies

14. Shell Programming and Scripting

Help with if statement syntax in shell script

I want to make the file test condition a variable ($Prmshn in code below). My goal is to use something like the first three unsuccessful if statetments since the 'if #!/bin/ksh test_input() { Prmshn=${1} InFLNm=${2} ifReq="-$Prmshn $InFLNm" #the following three if statments fail: #if ] ;... (10 Replies)
Discussion started by: ms63707
10 Replies

15. Shell Programming and Scripting

If echo statement return false

I have this code that sometimes return a false value and the code inside the if statement gets executed and error out. Any idea why? thanks. So I set a debug and see what the value for $ScriptElapsedTime Here is the value I got ScriptElapsedTime='03:20'. Base on this value the if... (10 Replies)
Discussion started by: nugent
10 Replies

Featured Tech Videos