date: May 8, 1987 to: DECUS RT-11 users from: Edward L. Hendrickson 258K Metals Development Ames Laboratory ISU/USDOE Ames, IA 50011 515/294-3590 Subject: First release of FLECS.IND Version 1.4 The FLECS.IND command file was written by Edward L. Hendrickson of the Ames Laboratory at Iowa State University as part of U.S. Department of Energy contract W-7405-ENG-82. The right to use this software release is allowed in the public domain. The author, Ames Laboratory, and USDOE assume no responsibility as to the correctness of the code nor the appropriateness for such use as it may be applied. Any comments about FLECS.IND may be directed to the author at 258K Metals Development, Ames Laboratory, Ames, Iowa 50011. FLECS.IND RT-11 SIG DECUS Release 1 Spring 1987 1.0 GENERAL OVERVIEW FLECS.IND is an IND command file that automates the use of Flecs. Flecs (Fortran Language with Extended Control Struc- tures) was written by Terry Beyer, and first released on the Fall 81 RT SIG tape. FLECS.IND speeds up and simplifies the Flecs environment. The particular version of FLECS.AL (the save image) included with this release was built from the sources distributed in FLECS1.DSK and FLECS2.DSK on the Fall 85 RT SIG tape. This version is large in terms of memory re- quired and probably will require TSX-Plus. An older save im- age of Flecs called FLECS.RT is also included and will run under most RT-11 monitors. With FLECS.IND the user types one command line and the entire translation and compilation process is completed tran- sparently. Without FLECS.IND the user must remember the Flecs command string syntax, then wait for the source to be translated to Fortran, then compile the .FTX (Fortran) code using the correct Fortran command string syntax. Also, cross references can be generated by using either the /CROSS or /IDX switch. This option invokes INDEX.SAV which comes from the Fall 81 RT SIG tape. A copy of Index has also been included. 2.0 INSTALLATION 2.1 FILES There are 12 files included with this release located in FLXIND.DSK and F77IND.DSK . The following files are found in FLXIND.DSK: FLECS.IND, FLECS.AL, FLECS.MAN, DISPLA.IND, FLXIND.RNO, README.1ST, INDEX.SAV, INDEX.DOC, and FLECS.RT. The /F77 option of the Flecs command is found in F77IND.DSK: F77.IND, F77IND.RNO, README.1ST and DISPLA.IND (is provided twice). Use the following command to install the necessary files onto the system disk. COPY dev:(.IND,.AL,.SAV) SY:/NOREPLACE The translator should be named SY:FLECS.AL, this is a version of the Flecs translator that has changes made to fix expansion of tabs. If you are running RT-11 and do not have enough -1- FLECS.IND RT-11 SIG DECUS Release 1 Spring 1987 memory to run Flecs.AL, then COPY FLECS.RT to SY:FLECS.AL and try again. (Note that the document included covers the newer version Flecs.AL and should be sufficient for Flecs.RT, although there are some differences.) INDEX.SAV should be in- stalled if you want to use the /IDX switch. If you are not familiar with the Flecs environment and language then you will need to read the Flecs user's manual (FLECS.MAN), included with this release. If you you want to use the /F77 switch then your FORTRAN 77 compiler should be named SY:F77DEF.SAV, and the F77.IND file must be on SY: . 2.2 UCL User commands will simplify invocation of the command pro- cedures. Define the following 2 commands. FLE*cs :== IND SY:FLECS.IND ^ F77 :== IND SY:F77.IND ^ Note that for F77 or Flecs to be recognized as a command using standard RT UCL, you will need to remove F77.SAV and FLECS.SAV from the system disk. (Remember that RT UCL means User Com- mands Last; the save image on the system disk would be in- voked before UCL is searched.) Under TSX-plus and some RT UCLs, the switches may follow ei- ther the command or the file name. For standard RT UCL, the switches must follow the file name. If you do not have UCL then do the following: .COPY SY:FLECS.IND DK:FLECS.COM -- put FLECS.COM in your default disk. .@FLECS -- for any user with SET KMON IND or .IND FLECS -- for any user with SET KMON NOIND . 2.3 WORK FILES You will need to make a logical assignment for WF:. There are several scratch files created on WF:, such as WF:filename.FTX, the Flecs generated Fortran source. So the free space re- quired will vary with the application being developed. The recommended location for WF: is VM:, as in "ASSIGN VM: WF:". -2- FLECS.IND RT-11 SIG DECUS Release 1 Spring 1987 Any disk with sufficient free space will also work, although VM will be faster. 2.4 HELP AVAILABLE To display FLECS.IND online help type "FLECS HELP", "FLECS ?", or "FLECS/help". If you need to compile a Flecs file named Help, use the explicit extension name, as in "FLECS Help.flx". 2.5 PRINTING There are 2 switches available to print listing files. To en- able the /Print switch you must define LP: as the printer. To enable the /LN03 switch you must define LN: as the LN03 printer, or any other secondary printer that you might have. 3.0 SWITCHES. Currently there are 21 switches available: /B*ounds check to see if arrays are out of bounds ( F77 only ) /CO*mment include comment lines in generated .FTX Fortran file on DK: /CR*oss create .IDX cross reference file by running SY:INDEX, same as /I /D*ebug allows Flecs to translate lines with "D" in column 1 /DK sends all output to DK: unless /Ln03 or /Print switch used /F7*7 use the F77 compiler. Must have F77.IND and F77DEF.SAV on SY: /FI*n generate a .FIN and .FLL file. same as /NEW/FLL /FL*l Flecs listing copied to DK: /FT*x generate a .FTX file on DK: /H*elp display online help /I*dx create .IDX cross listing file by running SY:INDEX, same as /CR /LI*nes include Flecs line # s in col 75-80 of generated Fortran file /LIS generate a Fortran listing .LST, same as /S /L*n03 sends Fortran listing to the laser printer /LS*t generate a Fortran listing .LST, same as /S /N*ewfin generate a new indented source file .FIN /P*rint sends Fortran listing to the line printer /REPLACE CAUTION swaps Flecs source with .FIN, source renamed to .RPL /RE*cor:n max record length, in bytes, for run time I/O (4 < n < 4095) /S*ource generate a Fortran listing .LST, same as /LIS or /LST /T*race generate extra F77 code to do a full traceback (F77 only) Note: letters after the * are optional. -3- FLECS.IND RT-11 SIG DECUS Release 1 Spring 1987 4.0 EXAMPLES Switches can always go after the filename or may (for some UCLs) go after the command name. (See section 2.2 describing UCL setup.) Usually only one letter is needed for each switch. The order of the switches does not matter, and they can be in either upper or lower case. The .FTX scratch file is built on WF:. If the /comm switch is used then the .FTX file is built on DK:. FLECS.IND produces EIS code as the default Fortran IV code. The following examples show a file named TEST.FLX being com- piled with a few of the many switch combinations that are pos- sible. Examples: FLECS Test/Lines/FIN/fll/fin/debug FLECS/PRINT/SOURCE Test.FLX Flecs/p/s test Flecs TEST/S/p Flecs TEST/lst/D Flecs/F77/LIS/bounds/trace test Flecs test 5.0 FLECS FILE EXTENSIONS The Flecs source default file extension is .FLX. When a .FLX file is input to the Flecs translator it will output a .FTX (Fortran) file. If the /FLL switch is used then Flecs will also generate a .FLL file, which is a listing of the Flecs source including Flecs diagnostics and line numbers. If the /FIN switch is used then both a .FLL and a .FIN file will be created. The .FIN file is an automatically indented version of the .FLX file and can be edited and used as your new source file. (See FLECS.MAN for more information about Flecs files and the Flecs language.) .FLX Flecs source (input to the Flecs translator) .FTX Fortran source, generated by Flecs .FLL Flecs listing with line numbers (Flecs output) .FIN Flecs indented source with no line numbers (Flecs output) -4- FLECS.IND RT-11 SIG DECUS Release 1 Spring 1987 .IDX Not a Flecs file but an INDEX cross reference file Any extension name (except .FLX) can be used as a switch to create a file on DK: with that extension name. Example: FLECS/IDX/FIN/FLL/FTX TEST.FLX The /Replace switch should only be used when there are no Flecs syntax errors. This switch creates a .FIN file (Flecs indented listing) and copies it into the original .FLX file. The original .FLX file is renamed to be a .RPL file in case you might need to get the original back. 6.0 F77.IND 6.1 DESCRIPTION OF F77.IND F77.IND can either be used as a stand alone command procedure or with the /F77 switch in FLECS.IND . The /F77 switch nests to the SY:F77.IND command file. F77.IND is an IND command procedure that simulates all of the Fortran switches avail- able. On our system Fortran IV is the default Fortran (SY:FORTRA.SAV), invoked by the Fortran DCL command. F77.IND provides command level control of the F77 compiler switches. (See F77IND.DSK in this same release for a more detailed description of the F77.IND control file.) -5-