MEM file issue

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: MEM file issue

Post by AUGE_OHR »

hi,
RPC wrote: Sat Aug 22, 2020 10:54 am
AUGE_OHR wrote: Wed Aug 19, 2020 11:12 pm you will find hb_mvRestore() and hb_mvSave() in c:\hmg.3.4.4\0\MEMVAR\testmemvar.prg
I could not locate testmemvar.prg in my HMG or Harbour folder.
Can you please upload it
you are right, it is not part of HMG Constribution, sorry

it got it from this Thread
https://www.hmgforum.com/viewtopic.php? ... 26&p=61009
testmemvar.zip
(2.56 KiB) Downloaded 117 times
have fun
Jimmy
RPC
Posts: 284
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: MEM file issue

Post by RPC »

Hi Jimmy
Thanks for the link. Its the file uploaded by me.
Do you have any program which uses save and restore of variable name greater than 10 alphabets ?
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: MEM file issue

Post by mol »

RPC wrote: Sat Aug 22, 2020 7:37 pm Hi Jimmy
Thanks for the link. Its the file uploaded by me.
Do you have any program which uses save and restore of variable name greater than 10 alphabets ?
I think that's not problem. You can use this scenario to save variables:

Code: Select all

_tmp1 := xFirstVariableWithLongName
_tmp2 := xSecondVariableWithLongName
save all like _tmp* to memfile.mem
and when you restore:

Code: Select all

restore from memfile.mem additive
xFirstVariableWithLongName := _tmp1
xSecondVariableWithLongName := _tmp2 
RPC
Posts: 284
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: MEM file issue

Post by RPC »

Great solution mol.
Such a simple way to solve the problem which I was trying to figure out for a long time.
Many many thanks
User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: MEM file issue

Post by serge_girard »

SAVE and RESTORE are so powerful; never seen this in any other language then dBase, Clipper, Harbour .....!

Serge
There's nothing you can do that can't be done...
RPC
Posts: 284
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: MEM file issue

Post by RPC »

Thanks Serge. I did not know that.
Post Reply