Free FORTRAN Compilers. Free Fortran Compilers. There are a number of free Fortran 7. The one I have been using in my Fortran courses at York is. GNU, which implements Fortran 7. Fortran 9. 0 features. Thanks to Prof. Clive Page Dept of Physics Astronomy, University of Leicester, UK. Fortran in general. You can download the 1. SLATEC. library Version 4. July 1. 99. 3, from this page. The. package should run under all versions of. All the needed files are packed in one zipped file. Fort. 99. zip of about 6. MB. reason you need the older DOSEMX version. Windows. can download it from my old page. DOWNLOADCreate the directory FThe new folder must be immediately under the root of your hard disk. You can do this by double clicking My. Stepper Motor Driver Ic L297 L298 more. Computer, then. double clicking. C, and then selecting. New Folder from the File menu and calling the folder. F. Download the file Fort. You can do this by right clicking the mouse on the above link, and choosing. Save Target As. In the Save As. F folder, and save the file in it. Unzip the downloaded file into F. Yon can do this by locating the file starting from My. Computer and simply. Make sure to specify that all files should. F folder. Note If the unzip program does not give you the option to specify the extraction location. F. When done, you should see the four folders G7. SLATEC, MINE, and YORK appearing in F. Thats it You use the compiler through CLI, the command line interface aka. DOS after setting two environment. PATH and LIBRARYPATH, as shown below. You store your programs in the FYork directory, compile them. Here is a very short program to test the compiler and the configuration. Convert. implicit none. Declare. real4 temp. C, temp. F, FACTOR. ZEROSHIFT. parameter ZEROSHIFT 3. FACTOR 5. 9. Input. Enter the temperature in Fahrenheit. Compute. temp. C FACTOR temp. F ZEROSHIFT. Output. The corresponding Centigrade temperature is. C, degrees. Use any editor to create this program simply copy and paste and save it. FYork directory under the name test. You. can, of course, use any editor you like as long as you can save the file. Notepad, for example, uses. MS Word insists on its propriety format. I highly recommend using the Crimson. Lab 1 see below. To compile your program, start a CLI session by launching the command prompt. Accessories group and issue these two commands. PATHFG7. 7bin PATH. SET LIBRARYPATHFG7. These set the environment so that your computer would know where the compiler. Note these two commands must be issued every time you start a CLI session. You. can optionally automate this step by adding these two variables to the system wide. Control Panel. You can now compile and run your program by typing. If the first command returned an error then the directory was not created or. If the second command was not recognized, or complained that. More information on using the compiler can be found in the. Labs at the. FortranYork site. The FG7. 7doc directory has a detailed reference to. ANSI Fortran 7. 7. Fortran 9. 0 features added see below. The above FortranYork site. SLATEC usage examples. If you are already familiar with Fortran then the following points may be. Control Structures. You can use either the old goto based or the new structured control flow. Support of the ugly goto is meant for. Style. You can write your source using either the old style code column. Compilation Command. The above f. 2exe command is just a batch file that invokes. The command. g. 77 ffree form prog. The ffree form switch. Comments. In free form style, use In the. C in column 1. Statement Continuation. In free form style, you can continue a statement on the next line by ending it. In the old style, put a character in column 6. Path Separator. When referring to files e. OPEN statement. use a forward slash or two consecutive backslashes rather than a backslash. This is because the backslash denotes an escape sequence. IO Unit Numbers. Not all unit numbers are allowed in the OPEN statement. In. particular, unit 5 is pre connected to the keyboard. Units 1. 0. through 9. Fortran 9. 0 Features. These include Automatic arrays in subprograms, zero length strings. DOUBLE COMPLEX type, DO WHILE, the. END decoration, KIND, IMPLICIT NONE. INCLUDE statements, list directed and namelist IO on internal files. O and Z edit descriptors. NAMELIST, OPEN specifiers STATUSREPLACE, the. FILE specifier may be omitted in an OPEN statement if. STATUSSCRATCH is supplied, relational operators. LT. LE. ,. EQ. ,. NE. ,. GT. and. GE. SELECT CASE but not for. Separate Compilation of Subprograms. Your main program is recognized by the program statement, as in. Convert program above. The subprograms functions and subroutines. It is recommended. To compile a file that contains. A program that uses pre compiled object files can be compiled and linked to them. The above command searches all object files in mine to resolve any. Separate Compilation of Subprograms, automated. The supplied f. 2exe and f. SLATEC. subprograms. You dont have to directly issue the g. Assembly Listing. The S capital S switch allows you to.