HMG Tutorials & Tips

Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
  1. I have uploaded code for saving and restoring array to and from text file, you may check it.




    Statistics: Posted by Anand — Tue Jun 18, 2019 10:19 am

  2. Well! that's some trick. Its going to take me a while to understand but I'll give it a try.

    BTW Where are all those HB functions described? I have seen list of them but no reference to use.


    Statistics: Posted by bluebird — Mon Jun 17, 2019 5:34 am

  3. I'm using such a trick to save array in .mem file:


    cTemp := "{ || aArrayToSave := " + hb_valtoexp(aArrayToSave) + "}"save all like cTemp to "c:\hmgstorage\myarrays.mem"
    and a piece of code to restore:


    if file("c:\hmgstorage\myarrays.mem")BEGIN SEQUENCE with {|e| break(e)}restore from ("c:\hmgstorage\myarrays.mem") additiveif type(cTemp) <> "U"eval(&cTemp)endifEND SEQUENCEendif

    Statistics: Posted by mol — Sun Jun 16, 2019 6:16 pm

  4. Thanks for the reply but restore from cannot recall array memvars according to the
    Clipper reference. "Arrays and local variables cannot be SAVEd or RESTOREd."

    I think there is a function in Harbour somewhere but I can't find a description of it. HB_restore or something like that.

    If anyone knows the document describing it please post a reply.

    Statistics: Posted by bluebird — Sun Jun 16, 2019 5:41 pm

  5. Ya trataste con esto ?
    Have you tried this yet?

    RESTORE FROM "c:\hmgstorage\myarrays.mem"

    Statistics: Posted by andyglezl — Sun Jun 16, 2019 4:12 am