Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Easy way to store values to array elements
Message
From
22/03/2009 15:16:05
 
 
To
21/03/2009 21:05:34
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01390324
Message ID:
01390442
Views:
42
>for i=1 to n
> myA[i,1]=getwordnum(aRows, 1, ", ")
> myA[i,2]=getwordnum(aRows, 2, ", ")
>endfor

One may want to do eval() of the values.

Another one also net very elegant and short is:
Create Cursor curDummy (dummy L)
Append Blank
Select 1,2 from curDummy;
union all;
select 1,2 from curDummy;
union all;
select 3,4 from curDummy;
into array laMyArray
? laMyArray(1,1)
? laMyArray(1,2)
? laMyArray(2,1)
? laMyArray(2,2)
? laMyArray(3,1)
? laMyArray(3,2)
Bye, Olaf.
Previous
Reply
Map
View

Click here to load this message in the networking platform