[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+------+###################################################################
#+-| SAVE |-------------------------------------+#############################
#| +------+ The SAVE command saves the contents |#############################
#| of memory variables to disk |#############################
#+----------------------------------------------+#############################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------------+############################
#| SAVE <Var-list> TO <C-exp> [ADDITIVE] |############################
#+-----------------------------------------------+############################
##############################################################################
##############################################################################
##########+---| Description |---------------------------------------+#########
##########| SAVE creates a disk file with the name <C-exp> unless |#########
##########| ADDITIVE is specified. If the variable exists in the |#########
##########| SAVE file, then its original value is replaced. Field |#########
##########| variables may not be saved. To save the screen, use |#########
##########| the save_screen procedure or the savescrn() function. |#########
##########| ------------------------------------------------------- |#########
##########| Arrays may 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 |-------------------------------------------+#########
#########| * Save variables before terminating a program. |#########
#########| |#########
#########| VARDEF |#########
#########| LONG start_value |#########
#########| LONG end_value |#########
#########| CHAR input_line |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| |#########
#########| {...} |#########
#########| |#########
#########| SAVE start_value, input_line TO "D:\data.txt" |#########
#########| QUIT |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Save the current record position. |#########
#########| |#########
#########| rec_pos = recno() |#########
#########| SAVE rec_pos TO "record.txt" |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * Append data to a variable file. |#########
#########| |#########
#########| SAVE alias->field, stack_var, param_var TO "a:\tmp.txt"; |#########
#########| ADDITIVE |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 4 |-------------------------------------------+#########
#########| * Save an array to a memory file. |#########
#########| |#########
#########| VARDEF |#########
#########| CHAR(30) an_array[50] |#########
#########| ENDDEF |#########
#########| |#########
#########| SAVE an_array[] TO "carray.50" |#########
#########| QUIT |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
RESTORE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson