Retrieve memory variables from a memory (.mem) file



     <xcMemFile> is the memory (.mem) file to load from disk.  If an
     extension is not specified, the extension .mem is assumed.  The file
     name may be specified as a literal string or as a character expression
     enclosed in parentheses.

     ADDITIVE causes memory variables loaded from the memory file to be
     added to the existing pool of memory variables.


     RESTORE is a memory variable command that recreates public and private
     variables previously SAVEd to a memory (.mem) file and initializes them
     with their former values.  The scope of the variable is not SAVEd with
     the variable, but is instead established when the variable is RESTOREd.
     Arrays and local variables cannot be SAVEd or RESTOREd.

     When memory variables are RESTOREd, they are recreated as private
     variables with the scope of the current procedure or user-defined
     function unless they exist as public variables and you specify the
     ADDITIVE clause.  If ADDITIVE is specified, public and private variables
     with the same names are overwritten unless hidden with PRIVATE.  If
     ADDITIVE is not specified, all public and private variables are released
     before the memory file is loaded.

     Local and static variables are unaffected by RESTORE.  If a local or
     static variable has been declared in the current procedure or user-
     defined function and a variable with the same name is RESTOREd, only the
     local or static variable is visible unless references to the RESTOREd
     variable are prefaced with the MEMVAR alias.


     .  This example demonstrates a typical application of SAVE and
        RESTORE.  Here memory variables containing screens are SAVEd TO and
        RESTOREd FROM memory files:

        // Create and use a pseudoarray of screens
        SAVE SCREEN TO cScreen1
        SAVE ALL LIKE cScreen* TO Screens
        nNumber = "1"
        RESTORE SCREEN FROM ("cScreen" + nNumber)

 Files   Library is CLIPPER.LIB.



3 responses to “C5_RESTORE

  1. Pingback: C5_SAVE | Viva Clipper !

  2. Pingback: Variable Handling | Viva Clipper !

  3. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.