May 31, 1984 RESEQ: A FORTRAN Statement Number Resequencing Program R. W. Barnard Sandia National Laboratories Albuquerque, NM 87185 (505)-844-5115 This program is an enhancement and modification of one origi- nally submitted to the RT-11 SIG tape in 1980 by Larry Morton. It will renumber the statements of FORTRAN-IV and FORTRAN-77 programs to give them a nice order. The starting statement number and increment are specifiable. The current version of the program includes the DECUS library routine PARSE (11-662), which allows the user to enter only the file name, if desired. The default device and extension will then be added by the program. All the defaults are coded into the first part of RESEQ.FOR. The output file has the extension .RSQ. The library VT.OBJ contains PARSE and some other VT-100 screen-formatting routines. The library RESLIB contains the six subroutines used by RESEQ. SYSLIB Routines for Easier Conversion to FORTRAN-77 SYSLIB has the string-handling routines INDEX and LEN, which work on byte variables. FORTRAN-77 has two intrinsic routines of the same names which work on character variables. Needless to say, when FORTRAN-77 hits a FORTRAN-IV call to LEN or INDEX, it gets unhappy. To aid in the conversion of FORTRAN-IV routines to F-77 (i.e., to make it unnecessary to convert byte strings to character immediately), the following two routines can be added to SYSLIB. INDEXB LENB These have exactly the same functionality as the SYSLIB rou- tines INDEX and LEN, so all references in FORTRAN-IV programs can be rapidly changed to these new calls, and that portion of the conversion will not be a problem. The file SYSF77.OBJ can be added to SYSLIB by means of the Library utility, or can be included in the FORTRAN-77 OTS library.