Subject Re: Variables in MEM files
From Ronnie MacGregor <No_Sp@m.Thanks>
Date Mon, 14 Jan 2019 21:36:04 -0000
Newsgroups dbase.getting-started

In article <JBTuCXErUHA.1832@ip-AC1E04A7>, yianeco@cytanet.com.cy says...

> I can add and update variables in a MEM file but I can't figure it out
> how to delete (remove) a variable from the file.

Wow !!! . . . . Interesting one !!

I could have answered this question without hesitation twenty years ago, but
now, . . . . without experimenting and looking at the resultant .mem file with
a Hex Editor . . . . .

From memory, I think that the disk file is over-written each time, so that only
the variables you define in a save are written to the replacement disk file.

So I think deletion is by ommision from the save list.

Untested example from 25 year old code, modified to omit one variable :-

   Sxrem1=m->Finrem1
   Sxrem2=m->Finrem2
   Sxrem3=m->Finrem3
   Sxrem4=m->Finrem4
   Sxrem5=m->Finrem5
   SxremD=m->FinremD
   SAVE TO (SecPracPath)+"Sxrem.mem" ALL LIKE Sxrem EXCEPT Sxrem3

Does that work ?



--
Ronnie MacGregor
Scotland

Ronnie at
dBASEdeveloper
dot co dot uk

www.dBASEdeveloper.co.uk