GETFILE_TAGS Name
GETFILE_TAGS Purpose
Get selected tags from a control/defaults file.
Category
Calling Sequence
s = getfile_tags(file, tags) Inputs
file = name of control/defaults file. in
May also be a text array as if from file.
tags = list of tags to return (def=all). in
See notes for allowed forms.
Keyword Parameters
Keywords
/CONTINUED or CONTINUED=char. Merge continued lines
in file or given text array. Continued lines have a
continuation character at the end of the line, $ by
default, but another character may be specified.
TYPE=typ Optional type codes array, one for each item
in the full structure (not the subset). The typ code
is the same as given by the size function. Giving a type
code array will convert to the target data types. A
good way to do the typ codes is to look at the structure
without it to see the tag order and number.
See x=txtgetkey(/help) for more on the type codes.
/NOSORT do not sort tags, keep same order as in file.
ERROR=err Error flag: 0=ok, 1=file not opened,
2=no lines in file, 3 or 4=no tags found,
5=no tags given, null string returned.
Outputs
s = Returned structure with requested tags. out
Common Blocks
Notes
Notes: The list of tags in tags is processed by
wordarray to allow a flexible input (list or array).
Examples: 'a b c d' or 'a,b,c,d' or ['a','b','c','d']
are example allowed as tag lists.
See wordarray,/help for allowed keywords.
See putfile_tags for adding or updating tags in a text
file.
Modification History
R. Sterner, 2006 Apr 14
R. Sterner, 2006 Apr 18 --- Modified to return nulls for all
tags if file does not exist.
R. Sterner, 2006 Jun 19 --- Added note pointing to putfile_tags.
R. Sterner, 2006 Jul 07 --- Added drop_comments.
R. Sterner, 2006 Sep 06 --- Added TYPE=typ and /NOSORT keywords.
R. Sterner, 2006 Sep 24 --- Made sure err defined.
R. Sterner, 2009 Jun 26 --- Added CONTINUED=cont.
R. Sterner, 2010 Jun 11 --- Converted arrays from () to [].
R. Sterner, 2010 Jun 11 --- Upgraded the help text.
Copyright (C) 2006, 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.