Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rename public variables ??
Message
De
06/06/1997 10:25:45
 
 
À
06/06/1997 01:23:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00035353
Message ID:
00035396
Vues:
36
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform