GETFILE 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.
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.
R. Sterner, 2010 May 03 --- Converted arrays from () to [].
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.