Programmer Guide/Command Reference/TAGS: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 21: Line 21:
  # <var>#tags</var> will store all current tags of table <var>tableItem</var>,
  # <var>#tags</var> will store all current tags of table <var>tableItem</var>,
  # and all lines of the table will be untagged (<var>reset</var> argument 1)
  # and all lines of the table will be untagged (<var>reset</var> argument 1)
  #tags := TAGS tableItem 1
  <var>#tags</var> := TAGS <var>tableItem</var> 1
   
   
  # <var>#tags</var> will store all current tags of table <var>tableItem</var>.
  # <var>#tags</var> will store all current tags of table <var>tableItem</var>.
  # Currently tagged entries will keep their tags (<var>reset</var> argument 0)
  # Currently tagged entries will keep their tags (<var>reset</var> argument 0)
  #tags := TAGS tableItem 0
  <var>#tags</var> := TAGS <var>tableItem</var> 0
   
   
  # the lines 2,5 and 7 will be tagged additionally (<var>reset</var> argument 0)
  # the lines 2,5 and 7 will be tagged additionally (<var>reset</var> argument 0)
  TAGS tableItem 0 2,5,7
  TAGS <var>tableItem</var> 0 2,5,7
   
   
  # the lines 1,2,3 and 9, and only these lines, will be tagged (<var>reset</var> argument 1)
  # the lines 1,2,3 and 9, and only these lines, will be tagged (<var>reset</var> argument 1)
  TAGS tableItem 1 1,2,3,9
  TAGS <var>tableItem</var> 1 1,2,3,9

Latest revision as of 20:50, 30 April 2014

#var := TAGS table reset [taglist]

STx table items allow rows to be tagged (see Tagged and untagged table entries). Now the TAGS command may be used either to save (or, more accurately: to query), or to restore the state of tagging of a table item (and by "state of tagging of a table item" we simply mean the information which lines of a table are tagged, and which lines are not).

When omitting the taglist argument, the TAGS command will return the indexes of all tagged rows, separated by commas. And if you supply such a list for the taglist argument, the TAGS command will tag all those lines whose indexes are enumerated in taglist argument. Depending on whether you supply 0 or 1 for the reset argument, the old tags will be left untouched (0), or they will be all cleared (1) after querying or, respectively, before restoring. Simple, isn't it?

table the name of a table item
reset 0 (do not reset tags)

1 (clear tags after save or before restore)

#taglist a comma separated list of entry indices.
# #tags will store all current tags of table tableItem,
# and all lines of the table will be untagged (reset argument 1)
#tags := TAGS tableItem 1

# #tags will store all current tags of table tableItem.
# Currently tagged entries will keep their tags (reset argument 0)
#tags := TAGS tableItem 0

# the lines 2,5 and 7 will be tagged additionally (reset argument 0)
TAGS tableItem 0 2,5,7

# the lines 1,2,3 and 9, and only these lines, will be tagged (reset argument 1)
TAGS tableItem 1 1,2,3,9

Navigation menu

Personal tools