>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  TAG_TEST

TAG_TEST

TAG_TEST

Name


      TAG_TEST

Purpose


      Test if given tag is in given structure or hash.

Category


Calling Sequence


      flag = tag_test(ss, tag)

Inputs


      ss = given structure or hash. in
      tag(s) = given tag(s) or key(s). in

Keyword Parameters


Keywords


        MINLEN=mn Minimum tag length to match (def=exact match).
          SS may have the tag abbreviated down to mn characters.
          (But tag must be at least as long as appears in ss).
        INDEX=ind Index of first match (-1 means none).

Outputs


      flag = test result: out
          0=tag not found, 1=tag found.

Common Blocks


Notes


      Note: Tag may be a compound tag to test if a structure tag
        or hash key exists at some nested depth. For example:
        tag = 'tag1.tag2.tag3' to test for ss.tag1.tag2.tag3
        Nesting may mix structures and hashes.
        Useful for testing if tag occurs. Example:
        if tag_test(ss,'cmd') then call_procedure,ss.cmd
        Structure tags are case insensitive, hash keys are
        case sensitive.

Modification History


      R. Sterner, 1998 Jun 30
      R. Sterner, 2005 Jan 19 --- Added INDEX=ind.
      R. Sterner, 2006 Sep 27 --- Added MINLEN.
      R. Sterner, 2010 May 07 --- Converted arrays from () to [].
      R. Sterner, 2012 Aug 13 --- Allowed hashes also.
      R. Sterner, 2012 Aug 13 --- Allowed compound tags for nested structures.
  Copyright (C) 1998, 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.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us