Re: Linux Beta Release Now Available
- Posted by Kat <KSMiTH at PELL.NET> Oct 24, 1999
- 631 views
----- Original Message ----- From: Bernie Ryan <bwryan at PCOM.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Sunday, October 24, 1999 9:38 PM Subject: Re: Linux Beta Release Now Available > On Sun, 24 Oct 1999 21:30:21 -0400, Robert Craig <rds at ATTCANADA.NET> wrote: > > >define_c_var() I need to *dynamically* create a string > >at run-time containing the name of *any* variable that > > Rob > HGLOBAL GlobalAlloc( UINT uflags, DWORD, dwBytes) > > allocates bytes off the heap the flags tell if you want it to be fixed > removable, discardable, etc. > > define_c_var(char *var_name) > { > return GlobalAlloc( GMEM_FIXED, sizeof(var_name) ) > } Or do it in Eu like i did: make a sequence, store the var name in the first subseq and the contents as the second subseq. To find the var again, look at each odd-numbered subseq,, the value will be in the next subseq,, and that value can be an array of sequences too. Kat