Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Field Names?
Message
From
11/09/2000 14:12:37
 
 
To
11/09/2000 13:59:59
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00415009
Message ID:
00415019
Views:
25
>I want to parse one feild into an undefined number of other fields named desc1, desc2, desc3... descX. I would like to address those fields from within a loop using 'desc' and appending a numeric variable that I can increment every time through the loop. Any idea what the syntax would be for that?
>
>This might be a little clearer.
>
>

Use a named expression
See the bolded lines
I'm assuming you know how you will exit the loop - but I would suggest using a FOR loop instead.

>
>X = 1
>
>do while loop_condition = TRUE
>

lcField = "desc" + allt(str(x))
replace (lcField) with contents


>
>X = X + 1
>
>Loop
>EndDo
>
>
>Thanks.
>
>Ian
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform