Page 1 of 1

Save several arrays and variables of one file

Posted: Tue Jan 01, 2013 10:10 pm
by Eugene Lutsenko
Whether there are means for save at once several arrays and variables (listed, for example, as in DC_DebugQout) in the form of one file?

Re: Save several arrays and variables of one file

Posted: Wed Jan 02, 2013 2:20 am
by Tom
Look at SAVE TO and RESTORE FROM in the Xbase++-docs. This mechanism allows to store/restore private and public vars (no locals or statics!), including arrays, codeblocks and objects. It's a simple mechanism that stores vars to a XPF-file (replacement for ".MEM" from Clipper-times), and it doesn't contain any locking, so you have to take care about that in a network situation. Another way to save/restore vars is just using tables: Any var can be transformed to strings (Var2Char) and maybe stored in a memo field (excluding arrays and codeblocks). Arrays maybe (re)stored using the makro processor. You may also look at the DC_Ini-mechanisms of eXpress++. And at the DC_Reg-functions for using the registry.

Re: Save several arrays and variables of one file

Posted: Wed Jan 02, 2013 2:48 am
by Wolfgang Ciriack
You can save Arrays with DC_Array_W(), restore with DC_Array_R().