Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- showlines

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
showlines
Synopsis
/infobank/programs/share/showlines.for
Description
  Subroutine to type first N lines of a file to the terminal.

       
COMMENTS
  Lines are printed in bold-face,

  with a 'ruler' of column numbers beneath the last line.
  Useful for calling
  before a program asks for formats of input files.
  The file is "rewound" to the first record
  before returning to the calling program.
                   
    
USAGE
  "a" = argument, "r" = referenced, "s" = set

  
  call showlines                        (with the following arguments)
         Unit                        [variable i*4 r]
         NumDispLines                [variable i*4 r]
                 
  Input:
    Unit         = the unit number of a previously opened file
    NumDispLines = the number of lines in Unit to be printed to screen
    
  Output:
    None 
             
    
INCLUDE_FILES
  'drsvt'   (logical name)

    
    
FILES_USED
  unit=(d)unit(read,bcksp)

  unit=*(write)
  unit=6(write)
   
    
SUBROUTINES
  vescinit            (shared DRS external routine) 

  forerror            (shared DRS external routine) 
  stringlen           (shared DRS external routine) 
           
    
DISCLAIMER
  Although this program has been used by the U.S. Geological Survey,

  no warranty, expressed or implied, is made by the Survey as to the
  accuracy and functioning of the program and related program
  material nor shall the fact of distribution constitute any such
  warranty, and no responsibility is assured by the Survey in
  connection therewith.
     
    
AUTHOR
  Clint Steele        11/14/83            .for

  Ed Maple            10/10/84   Limited the number of characters printed 
                                   to terminal per record to 132 since 
                                   that is the most allowed
  Carolyn Degnan      01/25/85   Took out blanks that got printed 
                                   with vescape stuff.
  Clint Steele        2/12/85    Modified for MAT 
  Jean Riordan        2/3/88     Modified for DRS$SHARE cleanup and 
                                   UNIX compatibility
  Clint Steele        9/27/88    Changed 80 col. display to 79 col.
                                 Changed output from * to unit 6

    
Reads
          read (Unit, '(a)', iostat = ErrorFlag, end = 16) Line 
Writes
                   write (6, '(1x,2(a))', iostat = ErrorFlag, err = 30) 
     *                            VBold, Line(StartLine:EndLine)
              write (6, '(1x,2(a))', iostat = ErrorFlag, err = 30)
     *                      VBold, Line(StartLine:EndLine)
Opens
Calls
              call forerror (ErrorFlag)
              call stringlen (Line, LengthLine)

Skip footer navigational links

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/share/showlines.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:36:50 PDT 2013  (chd)