NAME:
GETFILE
PURPOSE:
Read a text file into a string array.
CATEGORY:
CALLING SEQUENCE:
s = getfile(f)
INPUTS:
f = text file name. in
KEYWORD PARAMETERS:
Keywords:
ERROR=err error flag: 0=ok, 1=file not opened,
2=no lines in file.
/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 te file in the all !path directories (use
find.pro)
OUTPUTS:
s = string array. out
COMMON BLOCKS:
NOTES:
MODIFICATION 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.