Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rename public variables ??
Message
From
06/06/1997 10:25:45
 
 
To
06/06/1997 01:23:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00035353
Message ID:
00035396
Views:
34
>I have many public variables named like this:
> xxx_FieldName1, xxx_FieldName2, xxx_FieldName3 ...etc.
>I want to GATHER them into a table but can't figure how.
>I wish I could do something like
>RENAME ALL LIKE xxx_* m.*
>then I could do a simple GATHER MEMVAR but no...
>
>Any hints folks?

Hi Chris....try this

sele filename
X = afields(flds)
dime flds2[X]
for i = 1 to X
mnewfld = 'm.'+flds[i,1] && Should create the m.FieldName(i)
moldfld = 'xxx_'+flds[i,1] && the memory variables
&mnewfld = &moldfld && Move the value into the "m." field
endfor

You might have to play with it just a tad, but I've used similar code often.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform