Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rename public variables ??
Message
From
09/06/1997 11:45:35
 
 
To
08/06/1997 08:12:22
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00035353
Message ID:
00035662
Views:
35
>> 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
Previous
Reply
Map
View

Click here to load this message in the networking platform