Save several arrays and variables of one file

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Save several arrays and variables of one file

#1 Post 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?

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Save several arrays and variables of one file

#2 Post 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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Wolfgang Ciriack
Posts: 484
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Save several arrays and variables of one file

#3 Post by Wolfgang Ciriack »

You can save Arrays with DC_Array_W(), restore with DC_Array_R().
_______________________
Best Regards
Wolfgang

Post Reply