Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simplify Case Structure - The Real Story
Message
From
27/12/2007 11:15:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
27/12/2007 10:49:06
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01277777
Message ID:
01277825
Views:
21
This message has been marked as the solution to the initial question of the thread.
>>
>>local Diag[ max you can think of ]
>>
>>Diag[VAL(.Field001)] = LEFT(ALLTRIM(UPPER(.Field003)),AT('^',.Field003)-1)
>>
>
>How can I take that array value and put into a memory variable that is named accordingly? There is a GATHER being done later in the code, so it needs to be m.Diag1, m.Diag2... Would I still use an array in that case, or can I just build the variable name and do it that way?

It can be an empty object...
oRec=createobject("empty")
...

addproperty(oRec, "diag"+alltrim(.field001), upper(getwordnum(.field003, 1, '^')))
You can then do gather name, or insert from name oRec.

[update:] forgot the object as the first parameter above. Added now.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform