>  Docs Center  >  Libraries  >  Daithi  >  SREAD
Libraries

SREAD

SREAD

Name


        SREAD

Purpose


      This function extracts column delimited data (whitespace
      between columns) of data from a file and loads it into an
      string array.

Category


Input/output


Calling Sequence


      Result = sread( Filename )

Inputs


Filename: The name of the file to open and read.

Keyword Parameters


NOCOMPRESS: If set then whitespaces are not compressed to length 1.
The default is compression.
SEPARATOR: The string that separates columns of data.
SKIP_LINES: An integer number of lines to skip from the beginning of
the file.
TRUNCATE: If this keyword is set any (non comment) lines longer than
the first line will be truncated.
VERBOSE: Write some information about the reading process to the
terminal.

Outputs


Result: A string array matching the content of the file is returned.
A null string ('') is returned if there is an error.

Uses


str.pro

Restrictions


I'm sure there are some but they are unknown.

Example


text = sread( file, SKIP_LINES=5 )

Modification History


  Written by: Edward C. Wiebe, 2000-06-09.
      Modified: Edward C. Wiebe, 2002-02-07 (changed code to always
return '' if there is an error)
      Modified: Edward C. Wiebe, 2002-03-05 (fixed a bug where the
routine stopped with an error if the input filename was '' --
it now returns '')
Modified: Daithi A. Stone (stoned@atm.ox.ac.uk), 2005-03-10
(switched use of obsolete findfile to file_search)
Modified: DAS, 2007-01-17 (added NOCOMPRESS keyword)
Modified: DAS, 2009-09-29 (changed use of stringc to str.pro)



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