contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
action   remove    
  Related Syntax    

Syntax

  remove shelf-type? shelf-name indexer?


Purpose

Removes the selected item from the shelf. If no indexer is given, the currently selected item is removed.

The shelf-type is an optional herald.

When an item is removed from the shelf, the numbers of all items that follow it in the shelf drop by one. However, items with keys keep the same keys. remove can be used to produce a "cleared" shelf, with no items.

If a keyed item is removed from the shelf, that key can be reassigned to a new shelf item.

Unless modified by a repeat over or a using prefix, referring to a shelf item without using an index refers to the last (last-most) item on the shelf. Modifiable and read-only function arguments inherit the selected items from the caller.

Usage example:

  process
     local stream foo variable initial-size 0
     set new foo key "Mary" to "Mary had a little lamb.%n"
     set new foo key "fleece" to "Its fleece was white as snow.%n"
     set new foo key "school" to "It followed her to school one day%n"
     set new foo key "rule" to "Which was against the rule.%n"

     remove foo item 3
     remove foo key "fleece"

     repeat over foo
        output foo
     again   

remove actions are not permitted on shelves of a fixed size. Also, for shelves indexed by a repeat over action, the remove action is not allowed on original shelf items. However, items explicitly created inside the repeat over block may be deleted from that same block.

    Related Syntax
   repeat over
 
 
----

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:14 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.