  1.  NAME

  newext - Change the extension of file names

  2.  SYNOPSIS

  s = newext(old, new, fname, delim )

  3.  DESCRIPTION

  Return a string for a file name with a new extension. The extension
  delimiter can be specified to allow other changes in file names. The
  following rules take place:

  o  item_( For multiple extensions, only the last occurence of old is
     replaced with new.  )

  o  If the string old is not present in fname,the last extension is
     replaced by new.

  o  If the file does not contain any extension,the extension new is
     appended to it.

  4.  PARAMETERS

     old
        String with old extension.

     new
        String with new extension.

     fname
        Name of file.

     delim optional
        Specifies the extension delimeter to use. Default is ''. If
        delim is s tring with more than one character,all of them are
        used as the extension delimiter.

  5.  RETURNS

  The new file name.

  6.  AUTHORS

  Pierre Jaccard, Geophysical Institute, University of Bergen, 1999

