ToBeReviewed/STRING/
getfile.pro
Read a text file into a string array.
getfile
result = getfile(filein, error=error, help=help, quiet=quiet, lines=lines, find=find)
Return value
Parameters
filein
in
required
text file name.
Keywords
error
=err error flag: 0=ok, 1=file not opened,
2=no lines in file.
help
quiet
means give no error message.
lines
=n Number of lines to read (def=all).
Much faster if number of lines is known.
Automatic for IDL 5.6 or later.
find
search the file in the all !path directories (use
find.pro)
Version history
Version
$Id: getfile.pro 192 2006-09-22 09:37:08Z smasson $
History
R. Sterner, 20 Mar, 1990
R. Sterner, 1999 Apr 14 --- Added LINES=n keyword.
R. Sterner, 2003 Aug 29 --- Automatic lines if IDL 5.6+.
R. Sterner, 2003 Sep 02 --- Check if file exists first.
R. Sterner, 2003 Sep 04 --- Fixed error in number of lines in file.
R. Sterner, 2003 Oct 10 --- Fixed error when no lines.
R. Sterner, 2004 Jan 27 --- Fixed to work in IDL as old as vers 4.
S. Masson (smasson@lodyc.jussieu.fr) 4 Feb 2002
search te file in the all !path directories (use find.pro)
when using /find keyword. Use spawn, 'cat...' for unix os.
Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
Produced by IDLdoc 2.0.