[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+---------+################################################################
#+-| RESTORE |-------------------------------------------+####################
#| +---------+ The RESTORE command initializes variables |####################
#| from a memory variable file. |####################
#+-------------------------------------------------------+####################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------+##################################
#| RESTORE <Var-list> FROM <C-exp> |##################################
#+-----------------------------------------+##################################
##############################################################################
##############################################################################
#########+---| Description |----------------------------------------+#########
#########| RESTORE assumes the destination variable and the source |#########
#########| variable are of the same type and size. Otherwise, |#########
#########| the program may terminate prematurely. Field variables |#########
#########| may not be restored. |#########
#########| -------------------------------------------------------- |#########
#########| Unless the variable filename has an explicit extension, |#########
#########| .mem is assumed. |#########
#########| -------------------------------------------------------- |#########
#########| Arrays may also be saved and restored by using the |#########
#########| syntax <Array-ident>[], i.e., do not specify an array |#########
#########| element. The entire array is saved and restored. Be |#########
#########| sure the number of elements restored is the same as the |#########
#########| number saved. |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Restore data for memory variables from |#########
#########| * the file "variable.txt" |#########
#########| |#########
#########| RESTORE a_var, b_var, c_var FROM "D:\tmp\variable.txt" |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Restore an array. |#########
#########| |#########
#########| RESTORE x[],y[],z[] FROM "array.dat" |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * Save configurations in a .mem file. The FORCE |#########
#########| * library uses the variables __color_enhcd and |#########
#########| * __color_std to keep current color values. You |#########
#########| * can modify these variables directly. see data.hdr |#########
#########| |#########
#########| restfil = "mono.mem" |#########
#########| IF iscolor() |#########
#########| restfill = "color.mem" |#########
#########| ENDIF |#########
#########| |#########
#########| RESTORE __color_std, __color_enhcd FORM restfil |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
REPLACE
SAVE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson