READTOKEY Name
READTOKEY Purpose
Read an open text file until a given key word is found.
Category
Calling Sequence
readtokey, lun Inputs
lun = unit number of an open text file. in
Keyword Parameters
Keywords
KEY=K Key word to search for. First line in
which key word K is found is return in OUT.
File is searched up to line MAXLINE (def=1000).
Next read gets the next file line.
MAXLINE=M max line to search to.
START=S line to start key word search.
OUT=txt line of text in which key word was found.
ERROR=e error flag. 0=ok, 1=key word not found.
Outputs
Common Blocks
Notes
Notes: This is used to skip to a certain line in a
file. Readtokey may be called again to skip to the
next occurance of the key word (or another key word).
The file line containing the key word may be obtained
using the keyword OUT. Following lines in the file
may be read using readf.
Modification History
R. Sterner, 1 Feb, 1991
Copyright (C) 1991, 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.