contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
declaration/definition   save-clear    
Sample Code   Related Syntax   Related Concepts  

Syntax

  save-clear shelf-type? shelf-name


Purpose

The equivalent of a save declaration followed immediately by a clear action. After a save-clear saves the shelf, it clears the copy it made.

The shelf-type is an optional herald indicating the shelf type.

If the current contents of the saved shelf are not required in the local scope that performed the save, then save-clear can be used instead. The only difference is that after save-clear saves the shelf it clears the copy.

Because the size of the shelf is changed using a save-clear declaration, it may only be used on shelves that are declared to be variable. save-clear declarations may not have attached conditions. Unlike the save declaration, when save-clear is applied to stream shelves, there are no restrictions on what the items may be attached to.

If a number of save-clear declarations occur consecutively, the keyword save-clear may be replaced with either and or the "&" operator. This form is deprecated, since it does not enhance readability.

Sample Code  
   Binding shelf instances with "using"
 
Related Syntax
   clear
   save
 
Related Concepts
   Functions: applying "save" to arguments
   Global variables: saving values in local scopes
   Shelves: save declarations mixed with local declarations
   Shelves: saving contents
 
----

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

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

Copyright © OmniMark Technologies Corporation, 1988-1999.