>  Docs Center  >  Libraries  >  Buie  >  REPWRITE
Libraries

REPWRITE

REPWRITE

Name


  repwrite

Purpose


  Update file by replacing or adding line of information

Description


Category


  Utility

Calling Sequence


  repwrite,file,tag,line

Inputs



  file - string of file name to update (or create)
  tag - key to scan at the start of the line, all lines found
          matching this key will be replaced by the new line provided.
          Any other line matching this tag will be removed from the file.
          (scalar or vector, length must match LINE)
  line - Replacement line for file. If tag is not found, this will be
          added to the file. The output is left sorted by the tags.
          If this is an empty string (''), then all lines that match the
          tag will be removed.
          (scalar or vector, length must match TAG)

Optional Input Parameters


Keyword Input Parameters



  HEADER - String array to put at start of file if file is created.
              Default is no header. If file already exists, then this is
              ignored.
  HEADLEN - Number of lines at the start of the file to pass over.
              File must have at least this many lines to be valid. If no
              header provided, the default is 0. If you give a header, then
              the length of the string array is used as the default header
              length.
         

Outputs


  All output is to the file.

Keyword Output Parameters


Common Blocks


Side Effects


Restrictions


Procedure


Modification History


  96/11/19, Written by Marc W. Buie, Lowell Observatory
  97/2/6, MWB, different algorithm and file is now sorted.
  97/10/09, MWB, added HEADER and HEADLEN keywords
  98/03/22, MWB, added NOSORT keyword
  2000/09/20, MWB, added support for vector input on tag and line



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us