1 INDEX FORTRAN Cross Reference and Flow Chart utility. Called as follows: INDEX [/OPTION1[/OPTION2[...]]] file_spec[[+file_spec[/LIBRARY]....] 2 MNEMONICS Shown on the output listing as to how each variable was used on a given line. 3 ACCEPT 3 ASSIGN 3 ASSIGNED_VALUE 3 BACKSPACE 3 BLOCK_DATA 3 BYTE 3 BYTE_FUNCTION 3 CALL 3 CALLED_BY_ARG 3 CALLING_ARG 3 CHARACTER 3 CHARACTER_FUNCTION 3 CLOSE 3 COMMON 3 COMMON_NAME 3 COMPLEX 3 COMPLEX_FUNCTION 3 CONTINUE 3 DATA 3 DECODE 3 DEFINE_FILE 3 DELETE 3 DIMENSION 3 DO 3 DOUBLE_PRECISION 3 DOUBLE_PRECISION_FUNCTION 3 DOUBLE_COMPLEX 3 DOUBLE_COMPLEX_FUNCTION 3 EQUIVALENCE 3 ELSE 3 ELSEIF 3 ENCODE 3 END 3 ENDD0 3 ENDFILE 3 ENDIF 3 ENDMAP 3 ENDSTRUCTURE 3 ENDUNION 3 ENTRY 3 ERROR 3 EXTERNAL 3 FORMAT 3 FIND 3 FUNCTION 3 GOTO 3 IF 3 INQUIRE 3 IMPLICITNONE 3 IMPLICIT 3 INCLUDE 3 INTEGER 3 INTEGER_FUNCTION 3 INTRINSIC 3 LABEL_DEFINED 3 LOGICAL 3 LOGICAL_FUNCTION 3 LOCAL_FUNCTION 3 MAP 3 NAMELIST 3 NAMELIST_NAME 3 OPEN 3 OPTION 3 PARAMETER 3 PAUSE 3 PRINT 3 PROGRAM 3 QUAD 3 QUAD_FUNCTION 3 READ 3 REAL 3 REAL_FUNCTION 3 RECORD 3 REWRITE 3 RETURN 3 REWIND 3 SAVE 3 STOP 3 STRUCTURE 3 SUBROUTINE 3 TYPE 3 UNION 3 UNLOCK 3 USED 3 VIRTUAL 3 VOLITILE 3 WRITE 2 SPECIAL_ENTRY_POINT_TREE_SYMBOLS The Calling and Called_By trees can append onto the end of the entry point symbol one or more of the following symbols: '#' Indicates that this entry point is being called recursively and no further printout of this branch was done as it would be an endless loop. '?' Indicates that while this entry point name was called by some processed routine, no module was INDEX'ed that defined it. '*' The combination of the call nesting of the indicated subroutine pluss the lengh of the symbol name and any appended symbols would normally have extended it past the end of the line. In order to prevent truncation, the amount of indentation is adjusted to fit the entire symbol name on the line and it is flagged with this symbol to show that its indentation position is not indicative of its true call nesting level. 2 GENERATE_COMMAND_FILE For programs consisting of many files, this command file will generate a command file to do the actuall cross reference generation. Inputs consist of a data file listing the files to be cross referenced and commands at the time GENERATE is run. 3 DATA_FILE This is a list of source files making up the program, one file per line except when a given file requires a library file not useing the FORT$LIBRARY access. Then the library file(s) is put on the same line, seperated from other file specs by a comma and haveing a /LIBRARY switch appended. INCLUDE file names are not to be included in this list. No blank lines and all names left justified. It is assumed by GENERATE.COM that each file to be cross referenced only has one source module (main program,BLOCK DATA,SUBROUTINE,FUNCTION) in it. This allows for a faster INDEX run. If this assumption is not correct for a given file, then preceed its name in the data file (in the left most collumn) by a "+". 3 RUNNING_GENERATE GENERATE is self prompting. The default generated command file is INDEX.COM but if the user wants another name their is no default extention. The default for the name of the file containing the list of file names is INDEX.DAT . The default cross reference output file name is MAIN.LIS, or if the user wants to specify another name, the extention .LIS is the default. The resulting command file is invoked like any other command file to generate the wanted cross reference output. Due to their resource intensive requirements, no flow charts are included in the output. 2 Parameters The file specification for both input and output (unless output spec is over ridden by /OUTPUT=...) is just the file name with the default output type being .LIS and the default input being .FOR . When accumluateing data for SUPER index or ENTRY POINT index, the commands to accumulate must be on seperate lines than the command to output the wanted index. The user should first bring up the prompt by just invokeing INDEX and issue the commands to accumulate the data on one or more lines (continuation commands do not work in this context), then on a separate line issue the command to output the SUPER/ENTRY index (do not let INDEX exit or all data accumulated will be lost). 2 Qualifiers /ADD_PRESERVE=file_spec Same as /PRESERVE except that the data is put into an existing ISAM file. /APPEND Append the output of this module output to the end of the specified list file. Same as /MERGE /ARGUMENT Used during simple INDEX. Saves information on the use of variables as arguments in SUBROUTINE and FUNCTION calls. The output of the simple INDEX listing contains that information as part of the how used information. The format for each use is reported as follows lll-CALLING_ARG_xxxxxx_nnnn where 'lll' is the line number, 'xxxxxx' is the name of the routine in which that variable appears as an argument, and 'nnnn' is a 4 digit number showing what argument number it is. This switch is not required to save argument information for the SUPER INDEX. /CALL_ARGUMENT This is a special form of the SUPER INDEX. It generates a list of all cross referenced modules with argument lists and outputs by module each argument, the name of the argument as defined in the argument list, and for each call to that entry point, the name of the module containing the call and the name of the variable passed in the specific argument position. When the output is generated, this switch is used NOT the /DO_SUPER switch. Infomation is gathered by the /GET_SUPER switch /CALLED_BY_TREE During entry point cross reference- output a graphical representation of the routes by which modules are called from the main routine. /CALLING_TREE During entry point cross reference- output a graphical reperesentation of the calling tree. The Main program to the left side, and indented for each level of call. /CHANGED Output to list file and save for SUPER INDEX only those variables that have been assigned a value in the source file. /CHART[=[NOCONNECTOR][:][NOMOVE]] Generate a flow chart for the current source module being INDEXed. This is a resource intensive option, so use it only as needed. The optional arguments allow modification of the Flow-Chart format. Normally all blocks of code that have only one input and that via some sort of jump, are moved to a location adjacent to the source of that jump. The argument NOMOVE will disable that feature. Normally all jumps to a location over 3 pages distant are not drawn in, rather the flow line from the jump statement goes to an imediately adjacent FLOW-CONNECTOR. The argument NOCONNECTOR will disable this this feature. Note that the use of the NOCONNECTOR argument will decrease run time and page faulting a significant amount at the expense of approximately 50% more output. Same as /FLOW_CHART. /COMMENT=" " Insert a comment into the listing header /COMMON_BLOCKS Lists the COMMON block names in a given module and saves for super index. Can be modified by the the switches /USED, /UNUSED, /CHANGED, and /UNCHANGED where the variables propigate their attributes to the COMMON name. /DEBUG Treat debug lines as executeable source (FORTRAN /D_LINES switch) /DELETE Output file will be deleted at conclusion of current module or if either the /SPOOL or /PRINT switch is specified, after file has been printed by the print symbiont. /DEPTH=n Used with /CALLING_TREE and /CALLED_BY_TREE switches. Limits the depth to which the subroutine nesting calls are shown. Those calls nested deeper than the specified value are left out and no indication made that the truncation occoured. /D_LINES Treat debug lines as executeable source. Same as /DEBUG. /DO_ENTRY Useing previously accumlated data, generate a listing of entry points, who they call, and who they are called by. /DO_SUPER Useing previously accumlated data, generate a SUPER INDEX listing. /EXPORT List those variables exported (changed and available to an external module) from the current module. /EXTEND_SOURCE Source files can have lines that can extend to column 132 rather than the default of column 72. An alternative method is the use in the source file of the OPTION statement. /FILE_NAME Used with the /DO_ENTRY switch to cause the name of the file containing the module to be output as part of the CALLS/CALLED_BY tabular listing. /FLOW_CHART[=[NOCONNECTOR][:][NOMOVE]] generate a flow chart for the current source module being INDEXed. This is a resource intensive option, so use it only as needed. The optional arguments allow modification of the Flow-Chart format. Normally all blocks of code that have only one input and that via some sort of jump, are moved to a location adjacent to the source of that jump. The argument NOMOVE will disable that feature. Normally all jumps to a location over 3 pages distant are not drawn in, rather the flow line from the jump statement goes to an imediately adjacent FLOW-CONNECTOR. The argument NOCONNECTOR will disable this this feature. Note that the use of the NOCONNECTOR argument will decrease run time and page faulting a significant amount at the expense of approximately 50% more output. Same as /CHART. /GET_ENTRY Break out of the specified source file all entry point information and save it for later output (no list file generated). /GET_SUPER Accumulate the information in the current source file for eventual output in a SUPER INDEX. Automaticaly gathers var/COMMON name, module name, variable storage inforation, argument useage information and variable type information. The tag data still requires the user to specify it by the /TAG switch. /GLOBAL Accumulate for output and SUPER INDEX only global variables (reside in COMMON). /HELP[= option] or [=( [/]option[,[/]option[.....]])] Bring up help file. For a particular subtopic use the form /HELP=subtopic or if it is a switch use the form /HELP=(/subtopic) in the case of nested information /HELP=([/]subtopic,[/]subtopic,........) /IMPORT List those variables used by the current module whose value is supplied by an external module. /INDENT=x Format control switch for SUPER INDEX output. Produces an indented listing to the depth indicated by "x" (x=0 to 5), default value is "0". For the sake of clarity, "x" should be less than or equal to the number of items in the SUPER INDEX output. The basic output is 2 items (variable/common name and the module name). The switches /[RE]ORDER and /REVERSE specifying the order and number of items. Working together these switches specify the format of the SUPER INDEX output listing. /LIBRARY File is a text library used searched input for INCLUDE statements. /LIST=file_spec Specify output file when file name is other than input file name Same as /OUTPUT=file_spec. See also /NULL and /TYPE. /LOCAL Accumulate for output and SUPER INDEX only local variables (do not reside in COMMON). /LOG Output module names as completed and command lines as input. /MERGE Append the output of this module output to the end of the specified list file. Same as /APPEND. /NARROW Output is formatted for listing on a terminal (80 col) /NOENTRY_TABLE Suppresses the listing of the entry point tabular listing of entry points, where defined, who calls and called by. /NOINDEX Suppresses the listing of the INDEX cross-reference table during simple and accumulate for SUPER INDEX operations. /NOLIBRARY_FUNCTIONS Used with /DO_ENTRY. Any undefined entry points are checked aginst an internal list of FORTRAN library routines and for the presence of a "$" in the name. If either condition is met, the symbol is not printed out in the entry point cross reference. /NOSOURCE Do not include the source listing in the list file. /NULL Directs all output to the null device (NL:). Same as /LIST=NL:. See also /OUTPUT and /TYPE. /ORDER=major_item:minor_item[:first_tag[:second_tag[:third_tag[:fourth_tag]]]] Used with the /DO_SUPER switch and is a super set of the /REVERSE switch. The SUPER INDEX data consists of 6 items, The variable/COMMON name, module name in which that variable/COMMON name was defined, the tag (if specified), the variable storage information, the SUBROUTINE/FUNCTION argument useage information and the variable type information. The normal output of the SUPER INDEX without this switch is a major heading of the variable/COMMON name followed by all the module names (minor items) applying to that variable/COMMON name. If the user does not want the default items selected in the default order, these can then be over ridden by the use of this switch. The items wanted are specified in the order wanted and those available items that are not wanted are not listed in the argument list. The argument list must be a minimum of two(2) items and a maximum of six(6) items with no repeats. The six items that can be specified are: NAME -for variable/COMMON name-can also be VARIABLE or COMMON MODULE -for the defineing module name TAG -for the tag string STORAGE -for the storage information-can also be specified STORE ARGUMENT -for the argument useage information TYPE -for the variable type information This switch is the same as /REORDER. Can be used with the /INDENT=x switch for further format control. /OUTPUT=file_spec Specify output file when file name is other than input file name Same as /LIST=file_spec. See also /NULL and /TYPE /PREPROCESSOR Use preprocessor produced line numbers found in columns 73-80 for cross reference. /PRESERVE=file_spec Saves the current SUPER INDEX data in an ISAM for the user to manipulate directly. /PRINT Spool the list file to the printer upon completion of current module index. Same as /SPOOL. /REORDER=major_item:minor_item[:first_tag[:second_tag[:third_tag[:fourth_tag]]]] Used with the /DO_SUPER switch and is a super set of the /REVERSE switch. The SUPER INDEX data consists of 6 items, The variable/COMMON name, module name in which that variable/COMMON name was defined, the tag (if specified), the variable storage information, the SUBROUTINE/FUNCTION argument useage information and the variable type information. The normal output of the SUPER INDEX without this switch is a major heading of the variable/COMMON name followed by all the module names (minor items) applying to that variable/COMMON name. If the user does not want the default items selected in the default order, these can then be over ridden by the use of this switch. The items wanted are specified in the order wanted and those available items that are not wanted are not listed in the argument list. The argument list must be a minimum of two(2) items and a maximum of six(6) items with no repeats. The six items that can be specified are: NAME -for variable/COMMON name-can also be VARIABLE or COMMON MODULE -for the defineing module name TAG -for the tag string STORAGE -for the storage information-can also be specified STORE ARGUMENT -for the argument useage information TYPE -for the variable type information This switch is the same as /ORDER. Can be used with the /INDENT=x switch for further format control. /RESTORE=file_spec Used with the /DO_SUPER switch. Causes INDEX to do a SUPER INDEX based on data in an existing data file created by the /PRESERVE and /ADD_PRESERVE switches. Do not use with the /SAVE_SUPER switch. /REVERSE Used with the /DO_SUPER switch. Causes the SUPER INDEX output to be reveresed.Where the major items were the variable/COMMON block names followed by the modules referenced (with tags if specified), this switch causes the output major items to be the module names followed by the variable/COMMON block names (with tags if specified). This is a simple form of the /ORDER or /REORDER switch and can be used with the /INDENT=x switch for further format control. /SAVE_ENTRY After the completion of the current entry point cross reference, the symbol table that was built is saved for re-use by the next command. If the next command is not /DO_ENTRY, then the data is lost. /SAVE_INDEX After the completion of the current simple INDEX or save for SUPER INDEX, the symbol table that was built is saved for re-use by the next command. If the next command is /DO_SUPER,/DO_ENTRY or /GET_ENTRY, then the data is lost. Unless over-ridden by one of the switches mentioned above, the next command uses the data saved in the table, ignoreing any input files that may be specified. WARNING This switch will only work properly if the input contains only one source module ( PROGRAM, SUBROUTINE, FUNCTION, or BLOCKDATA ). If multiple modules are processed useing the same /SAVE_INDEX command, all the data from all the sources will be saved as if all the data items were in the last source processed. /SAVE_SUPER After the completion of the current SUPER INDEX, the data in the scratch files is saved for re-use by the next command. If the next command is not /DO_SUPER, then the data is lost. Do not use with the /RESTORE switch /SPOOL Spool the list file to the printer upon completion of current module index. Same as /PRINT. /STATISTICS Print the index statistics about each source module at the end of the module listing in the list file. /STORAGE Causes the storage information for the selected variables to be show on the INDEX listing in square brackets. This is the same as /STORE. Not needed to save storage information for the SUPER INDEX. /STORE Causes the storage information for the selected variables to be show on the INDEX listing in square brackets. This is the same as /STORAGE. Not needed to save storage information for the SUPER INDEX. /SYMBOL=xxxx Used with the /CALLING_TREE and /CALLED_BY_TREE switches. The root of the tree(s) generated being the specified symbol rather than the default main program or last subroutine in the calling tree. /TAG="xxxx...xxxx" Used with the /GET_SUPER switch. All variables or common block names saved for the super INDEX have the specified tag associated with them and is output during the super INDEX. The tag specified can be up to 31 characters long. /TRANSFER_ENTRY Used with the /CALLING_TREE and /CALLED_BY_TREE switches. All calls to entry points defined by ENTRY statements are redirected to the defineing SUBROUTINE/FUNCTION module in which it is defined. /TYPE Directs the INDEX output to the user terminal. Same as /LIST=TT: or more accurately /LIST=SYS$OUTPUT:. See also /OUTPUT or /NULL. /UNCHANGED Output to list file and save for SUPER INDEX only those variables that are found not to be assigned a value in the specified source file. /UNUSED Output to list file and save for SUPER INDEX only those variables that are declared to exist in type, dimension, common etc statements but are never used. /USED Output to list file and save for SUPER INDEX only those variables that are used in the body of the source . Declared but unused variables are ignored. /VARIABLE_TYPE Causes the variable type information to be printed out on an INDEX listing in angle brackets. Not needed to save variable type information for the SUPER INDEX. /WIDE (D) Output files are formatted for listing on a line printer (132 col)