Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rename public variables ??
Message
De
09/06/1997 11:45:35
 
 
À
08/06/1997 08:12:22
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00035353
Message ID:
00035662
Vues:
37
>> 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.
>
>just about what I wanted to suggest, with a bit of difference:
>
>sele filename
>X = afields(flds)
>for i = 1 to X
> xxx="xxx_"+flds[i,1]
> m_dot="m."+flds[i,1]
> if type(xxx)#"U"
> store (xxx) to (m_dot)
> endif
>endfor
>
>This checks for unmapped fields and skips them, and, besides, reminds me
>of the joy I had when first I discovered that name expressions can be
>used to create variables :)


Great minds (and old Foxpro'ers) !
"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
Répondre
Fil
Voir

Click here to load this message in the networking platform