<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

ToBeReviewed/STRING/

getfile.pro

Read a text file into a string array.

topgetfile

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 262 2007-08-21 14:19:32Z pinsard $

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 the file in the all !path directories (use find) 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.

Statistics

McCabe cyclic 17
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.